Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rep = game:GetService("ReplicatedStorage")
- local variables = rep:WaitForChild("Variables")
- local vote1 = variables:FindFirstChild("VoteChoice1")
- local vote2 = variables:FindFirstChild("VoteChoice2")
- local vote3 = variables:FindFirstChild("VoteChoice3")
- local votere = rep:WaitForChild("RemoteEvent"):WaitForChild("Vote")
- votere.OnServerEvent:Connect(function(plr,choice)
- plr:WaitForChild("voted").Value = true
- if choice == "Choice1" then
- vote1.Value = vote1.Value + 1
- elseif choice == "Choice2" then
- vote2.Value = vote2.Value + 1
- elseif choice == "Choice3" then
- vote3.Value = vote3.Value + 1
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement