Salutations. I am having issues with adding a point to the local player’s stats once they’ve touched a part.
I may just be really unintelligent or I may just have made a few mistakes. I’m just starting out in programming so I do expect quite a few errors within the script but what’s made me really puzzled is the fact that output doesn’t present me any errors.
I hope someone will resolve this error!
The script is written in a local script and the parent of the script is the part I want touched. I may have gotten a directory wrong or some sort of common error but if I did, it would usually give me the error in output.
script.Parent.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
player.leaderstats.Strettos.Value = player.leaderstats.Strettos.Value + 1
end
end)
That’s the script that is in the part. I have referenced it off a few forum posts and used the forum posts to help me.
I hope to find a solution soon! Thanks a lot!