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

Would This Work??

What it should do is award a player point (If available) to the owner of a factory if he has upgraded everything.

if script.Parent.Factory.Grader1 == nil and script.Parent.Factory.Grader2 == nil then
	name = script.Parent.Factory.OwnerName.Value
	player = game.Players:FindFirstChild(name:tostring())
	h = game:GetService("PointsService")
	balance = h:GetAwardablePoints()
	if balance >= 1 then
		h:AwardPoints(player.userId, 1)
	end
end

I'm new to advanced scripting, so please help me improve :D

P.S If you have done any changes, please explain as best as you can in detail on what the script does, preferably line be line

1 answer

Yes it would work, but I don't think it'll work some times.

1 comment

0

Great, thanks!

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