RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"when a part named Orb is collected it updates player leaderstat"
-- script for the Orb part local orb = script.Parent local function collect(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player then player.leaderstats.Orbs.Value = player.leaderstats.Orbs.Value + 1 orb:Destroy() end end orb.Touched:Connect(collect)