Hey yall! I am trying to make it when you touch a part it adds a point, but when you touch it again it won’t. I have the leaderstats script already (the IntValue is called ‘Wins’). Thank you in advance
-JaisonDXYX
Hey yall! I am trying to make it when you touch a part it adds a point, but when you touch it again it won’t. I have the leaderstats script already (the IntValue is called ‘Wins’). Thank you in advance
-JaisonDXYX
#try this
local part = put the part path here
_G.touched = false
part.Touched:Connect(function(hit)
if not _G.touched and hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Wins = 1
end
end)
if it still doesn't work then please dm me at
#Blue Duck#8344
Mine is JDev#4583
No sadly =. :
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
I might try boolvalues! If that will work I will take this post down thank you advance!
You will want to change the answer to the same thing but the player.leaderstats.Wins to player.leaderstats.Wins += 1