So I finally finished my scoring system and data saving, but when I put more than 1 Gem down it doesn't work. And I can't find out a way to make more than 1 onTouch without having to name them 1 by 1 which in the end wouldn't work.
local Gems = game.Players.LocalPlayer.leaderstats.Gems
function onTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) == game.Players.LocalPlayer then
Gems.Value = Gems.Value + 1
hit:Destroy()
print("Ads")
end
end
game.Workspace.Gem.Touched:connect(onTouched)

1 comment
Didn't work :P