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

Vote Pads #Help?

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!

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.

3 comments

0

I'm trying to make it so it +1's to my SurfaceGUI, but I wasn't expecting this script:

0

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)

0

I mean, IDK how to use this script to +1 to a Surface GUI - I tried up top!

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