Whats the problem? i cant see anything wrong? what exactly do you need help with. Could you provide a bit more info? thatd be really helpful
Looking back. I dont know how. But i hadnt noticed that your loop is missing a wait(). Make sure to add “task.wait()” to your code otherwise it will run infinitely until it breaks.
while true do
if script.Parent.Position.Z > -10 then
script.Parent.Position = Vector3.new(26.322, 5.372, -10)
end
task.wait()
end
Your script infinitely hangs until Roblox stops it.
Try using RunService.Stepped instead.
local RunService = game:GetService("RunService")
RunSevice.Stepped:Connect(function()
if script.Parent.Position.Z > -10 then
script.Parent.Position = Vector3.new(26.322, 5.372, -10)
end
end)