When i execute script all works fine, but over time stops working. Script:
local plr = game:service("Players").LocalPlayer
local userinputservice = game:service("UserInputService")
local chest = workspace.Chests.LargeChest
_G.distance = 4
userinputservice.InputBegan:connect(function(inp)
if inp.KeyCode == Enum.KeyCode.T then
while wait() do
for _,v in next, chest:GetChildren() do
v.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.CFrame.X,plr.Character.HumanoidRootPart.CFrame.Y,plr.Character.HumanoidRootPart.CFrame.Z - _G.distance)
v.HumanoidRootPart.Anchored = true
end
end
end
end)
The problem is that through time writes: HumanoidRootPart is not a valid of Model. Help pls!
PS: Click view source to see all script, becouse website dont show to end!

6 comments
Why are you looping through the chest in order to set the HumanoidRootPart's CFrame?
But how can do else?
How about not looping through the chest?
Hm... I will try
Dont work(
Maybe its works, but maybe i do something not this way...