Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

umm guys i how to change the Object that follows me? here is my code

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

1 comment

0

if u want to help me just join this https://discord.gg/PwtJgmu discord or add me my name is FZSLegend Thank you.. :D

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.