Hello. I am currently working on a story type game. I am making a script where you vote for what item you want to use. This is the main script, and what I have currently.
local togglePollEvent = game.ReplicatedStorage.Remotes.togglePollEvent
wait(5)
togglePollEvent:FireAllClients(true)
wait(15)
togglePollEvent:FireAllClients(false)
wait(1)
if game.ReplicatedStorage.Poll.Option1.Value >= game.ReplicatedStorage.Poll.Option2.Value then
local AssetId = 21392199 -- paste the gear ID here
local Model = game:GetService("InsertService"):LoadAsset(AssetId)
local Tool = Model:GetChildren()
Tool.Parent = game.StarterPack
elseif game.ReplicatedStorage.Poll.Option1.Value < game.ReplicatedStorage.Poll.Option2.Value then
local AssetId = 10472779 -- paste the gear ID here
local Model = game:GetService("InsertService"):LoadAsset(AssetId)
local Tool = Model:GetChildren()
Tool.Parent = game.StarterPack
end
As you can see, there are two options. If one is selected it should give you the gear for which ever option has the most votes. But sadly, It does not work. Does anyone know a way for the game to give ALL players gear once the option wins! Please, :D
Note - Everything in the script and gui is all working, I just need the gear to be given.
