Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Would this point script work?

The Goal

I need to give the people who survived in a minigame points

How do I do this? Like this?

for _,v in next,alivePlayers do
	local leaderstats = v:FindFirstChild("leaderstats")
	local score = leaderstats:FindFirstChild("Points")
	score.Value = +15
end

Tell me if this is right or wrong. Thanks for your service!

Head of The AWESOME Gamers Group

PickUpTheBeat1

1 answer

✓ Accepted answer

You have it right, but the part where you add points is wrong. To do any form of mathematical formula, you first need to specify what you are adding on to. So:

score.Value = score.Value + 15

Also, I would recommend making a variable that specifies how much, simply for effeciency.

local PointsToAdd = 15

5 comments

0

Thanks dude.

0

I'm not right. I tested it and and error said: 17:54:49.111 - Workspace.Script:41: bad argument #1 to '(for generator)' (table expected, got nil)

0

Send me entire script, I will have a look. I expect it will be a syntax error in your script, since nothing in mine are wrong.

0

Dude, solved it already! Got it!

0

Good for you :)

This discussion is preserved as it was. New answers, comments, and votes are closed.