✓ Accepted answer
Okay so there are a couple of things that you messed up on but don't worry I'll explain:
So the first thing is the touched event is actually with a capital T so it's
script.Parent.Touched:Connect(function(player)
The next thing is that player is not actually player in this scenario. The touched event returns the part that touched the script.Parent. So in this case it was the humanoid not the player.
So in order to get the player you need to get the player from the character.
Do this:
script.Parent.Touched:Connect(function(partThatWasHit)
local player = game:GetService("Players"):GetPlayerFromCharacter(partThatWasHit.Parent)
if player.leaderstats.Stage.Value <1 then
local PlayerPoints = player.leaderstats.Stage
PlayerPoints.Value = PlayerPoints.Value + 1 else
print("Too high value")
end
end)
3 comments
Maybe you capitalized the L in leaderstats.
what is player in this scenario? Is it game.Players.LocalPlayer
OHHHH I UNDERSTAND WAIT