can someone help with a script that will make it so when you have a certain amount of points on the leaderstats, you can teleport to a different area using a teleport button.
i have already made the leaderstat script and the teleport button, but i cant seem to make the button not allow you to teleport if you dont have a certain value
you could probably do
local player = game.Players.LocalPlayer function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if (h ~=nil) then if player.leaderstats.Money.Value > 1 then h.Parent.Torso.CFrame = CFrame.new(Vector3.new(281, 30.6, -26)) --Type here the position you want to teleport to. end end end script.Parent.Touched:connect(onTouched)
put that in a localscript in the teleport pad part and remove the old script
Closed as Not Constructive by User#19524
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?