hi, i have a working teleporter script in my game but i need to make sure that it only teleports the player if they have the right amount of currency or more. but i dont want the amount of currency taken away from the player.
this is the teleport script:
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
hit.Parent.Head.CFrame = CFrame.new(-165, 16.5, -42)
end
end)
thanks in advance from poopypigeon245

5 comments
what do you mean by 'replace hit.money.value with the amount of money the player has'?
well, where do you keep track of how much money a player has? How can someone find out how much money he/she has? Where is the information of how much money the player has? That's what you are supposed to replace with.
if hit.leaderboard("PowerBlocks") >= 2 then
well then yeah replace hit.Money.Value with hit.leaderboard("PowerBlocks") then if you didn't already do so
it still wont work. should it work if the currency is over 2?