Note : "Cash" is not a leaderstat, its a value directly under Player.
function onClicked(player) if player.Cash.Value >= 75 then player.PlayerGui.Teleport.YouSure.Visible = true elseif player.Cash.Value < 75 then player.PlayerGui.Teleport.Nope.Visible = true wait(5) player.PlayerGui.Teleport.Nope.Visible = false end end script.Parent.ClickDetector.MouseClick:connect(Click)
Is this for a gui? or a brick? because if its for a gui then you would do this
function clicked() if player.Cash.Value >= 75 then else if player.Cash.Value < 75 then --(Need more information) end --this is lacking information i need to know where the button is located in your GUI end script.Parent.MouseButton1Down:connect(clicked)