I am creating Vote Pads with Surface GUIs, I pretty much got the Surface GUI part down. But, the Part detects the Player and +1's, I don't know. I know I need to use PlayerAdded, PlayerLeft and .Touched. But I don't really know how to create the script, PLEASE HELP!
COMMUNITY QUESTION
Vote Pads #Help?
1 answer
V=0
function Touched(Plr)
if game.Players[Plr.Parent.Name]~=nil then
V=V+1
end
function Ended(Plr)
if game.Players[Plr.Parent.Name]~=nil then
V=V-1
end
script.Parent.Touched:connect(Touched)
script.Parent.TouchEnded:connect(Ended)
V gets how much players are on it...Yeah...this should work. If it doesn't let me know.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I'm trying to make it so it +1's to my SurfaceGUI, but I wasn't expecting this script:
V=0 function Touched(Plr) if game.Players[Plr.Parent.Name]
=nil then script.Parent.Num.SurfaceGui.status.Text+1 end function Ended(Plr) if game.Players[Plr.Parent.Name]=nil then script.Parent.Num.SurfaceGui.status.Text-1 end script.Parent.Touched:connect(Touched) script.Parent.TouchEnded:connect(Ended)I mean, IDK how to use this script to +1 to a Surface GUI - I tried up top!