umm guys i how to change the Object that follows me? here is my code
local torso = script.Parent.HumanoidRootPart local center = Instance.new("Part") center.CanCollide = false center.Size = Vector3.new(1,1,1) center.Parent = game.Workspace local bp = Instance.new("BodyPosition") bp.maxForce = Vector3.new(9e+100, 9e+100, 9e+100) bp.P = 40000 bp.Parent = center while torso.Parent do center.BodyPosition.position = torso.Position wait() end center:Remove()
and what will i add that if the object go to my torso it will disappeard and will go to the leaderboard named Gem Collects and thats it Thank you
Before your while loop add this:
center.Touched:connect(function(other) if(other == torso) then --Add leader board stuff end end)
I'm pretty new here but from what I understand this website is like stack overflow. We aren't supposed to write entire scripts for you. In the if statement add the rest to update the leaderboard. Roblox wiki page is here : http://wiki.roblox.com/index.php?title=Leaderboard