Advertisement
saturnsolar

VoteScript (Map Voting GUI) | ROBLOX Studio

Apr 24th, 2020
9,851
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local rep = game:GetService("ReplicatedStorage")
  2. local variables = rep:WaitForChild("Variables")
  3. local vote1 = variables:FindFirstChild("VoteChoice1")
  4. local vote2 = variables:FindFirstChild("VoteChoice2")
  5. local vote3 = variables:FindFirstChild("VoteChoice3")
  6. local votere = rep:WaitForChild("RemoteEvent"):WaitForChild("Vote")
  7.  
  8.  
  9. votere.OnServerEvent:Connect(function(plr,choice)
  10.    
  11.     plr:WaitForChild("voted").Value = true
  12.     if choice == "Choice1" then
  13.         vote1.Value = vote1.Value + 1
  14.     elseif choice == "Choice2" then
  15.         vote2.Value = vote2.Value + 1
  16.     elseif choice == "Choice3" then
  17.         vote3.Value = vote3.Value + 1
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement