RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a football goal script"
-- local script local part = script.Parent local goal = game.Workspace.Goal local function onTouched(otherPart) if otherPart.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(otherPart.Parent) if player then player.leaderstats.Goals.Value = player.leaderstats.Goals.Value + 1 goal.BrickColor = BrickColor.new("Bright green") wait(1) goal.BrickColor = BrickColor.new("Bright red") end end end part.Touched:Connect(onTouched)