Advertisement
Sungmingamerpro13

FoodVoteScript

Mar 5th, 2023
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.39 KB | None | 0 0
  1. --- Variables ---
  2.  
  3. local AddVoteEvent = game.ReplicatedStorage.FoodsSystem.AddVoteEvent
  4.  
  5. local Option1 = game.ReplicatedStorage.FoodsSystem.Food1
  6. local Option2 = game.ReplicatedStorage.FoodsSystem.Food2
  7.  
  8. --- Add Vote ---
  9.  
  10. AddVoteEvent.OnServerEvent:Connect(function(plr, Option)
  11.    
  12.     if Option == 1 then
  13.         Option1.Value += 1
  14.     elseif Option == 2 then
  15.         Option2.Value += 1
  16.     end
  17. end)
  18.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement