diff --git a/src/community/docsGamesBuildersLua.js b/src/community/docsGamesBuildersLua.js index 789cb96..0253683 100644 --- a/src/community/docsGamesBuildersLua.js +++ b/src/community/docsGamesBuildersLua.js @@ -171,8 +171,18 @@ finishEvent.Event:Connect(function() winSound:Play() __rbxl_show_text("Победа! Ты дошёл до финиша!", 5) -- Конфетти над игроком (паритет с JS game.scene.spawnParticles) + print("[g2] before pos call") local pos = __rbxl_player_pos() - __rbxl_spawn_particles("confetti", pos.x, pos.y + 3, pos.z, 3, 3) + print("[g2] pos=", tostring(pos), "type=", type(pos)) + if pos then + print("[g2] pos.x=", tostring(pos.x), "pos.y=", tostring(pos.y)) + end + local px = (pos and pos.x) or 0 + local py = (pos and pos.y) or 6 + local pz = (pos and pos.z) or 33 + print("[g2] spawning particles at", px, py + 3, pz) + __rbxl_spawn_particles("confetti", px, py + 3, pz, 3, 3) + print("[g2] particles call returned") end)`, g2_finish: `-- === Скрипт финиш-зоны (Lua) === -- Висит на невидимой зоне над зелёной площадкой.