Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Can Some One Help?

Asked by 9 years ago

Im trying to make a gui on a brick than when the brick is inserted it the brick follows the player

p = Instance.new("Part", game.Workspace)
hum = script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Humanoid")
p.Position = CFrame.new(10, 15, 10) * hum.Parent.Torso.CFrame.lookVector

1 answer

Log in to vote
0
Answered by 9 years ago

If this is the only thing in the script then change

 p.Position = CFrame.new(10, 15, 10) * hum.Parent.Torso.CFrame.lookVector

to

while wait() do
    p.Position = CFrame.new(10, 15, 10) * hum.Parent.Torso.CFrame.lookVector
end
Ad

Answer this question