script.Parent.Touched:Connect(function(hit) local level = hit.leaderstats.level level.Value = level.Value + 1 end)
please help me fix?
When your character touches the part, the first thing that it touches is the part that it was touched by. Basically, if you touch the part with your left leg, it will check the left leg to find "leaderstats". You gotta do:
local level = hit.Parent.leaderstats.level
And in case it doesn't load for some reason, add:
local level = hit.Parent:WaitForChild("leaderstats").level