Hiya all. I am currently working on an obby that awards 100 player points at the end of the obby. Just to let you guys know, this is a button you press. I already have the scripts that make it change your team (To the first stage) and kill you so you spawn there. I've experimented and used a lot of help from a great scripter, but neither of us can get it to work. Now, the script doesn't even award points. It used to awards a lot of bulk 100 player points when stepped on.
This is the script that is in Workspace that gives the player a value (Thanks to fahmisack123)
game.Players.PlayerAdded:connect(function(player)
int = Instance.new("BoolValue")
int.Name = "Finished"
int.Parent = player
int.Value = false
end) --Put this in Workspace...
This is the script that is in the part that you step on to get player points. Just to classify, this part that is stepped on is IN workspace and NOT in a model, if that is needed. Again, thanks to fahmisack123
script.Parent.Touched:connect(function(player) --Part Touched, calls player
int = hit.Parent:FindFirstChild("Finished") --Checks for BoolValue
if int ~=nil and int.Value == false then --Checks if the BoolValue is there and if it's false
game:GetService("PointsService"):AwardPoints(player.userId,100) --Awards 100 Points
int.Value = true --Avoids another 100PP's
end
wait(1) --Waits 1 second before giving another 100PPs if they haven't got them yet
end) --Put this in the part that gets touched
Thanks for the help! I will make sure to give whoever helps a ton of credit. Also, these scripts are NOT in a local script.
