Hello Devs! so, i was working on a simulator, but im facing a problem.
Im currently making some portals, i want that if the player has enough coins (“Clicks in my game”) , teleport him to some place
I tried this Code but its not working
local player = game.Players.LocalPlayer
local Clicks = player.leaderstats.Clicks.Value
local PlayerHit = hit.Parent
if PlayerHit then
local Torso = PlayerHit.HumanoidRootPart
if Torso then
if Clicks >= 500 then
Clicks -= 500
Torso.Position = Vector3.new(-502.543, 7.462, -227.165)
This is my leaderstats folder
Is there a way to fix it?
Thanks for reading!