Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a reason why a remote wouldn't fire?

Asked by 6 years ago

I don't know why but for some reason the remote PleaseWork doesn't fire, could someone help me, I can't figure out for the life of me why it's not firing :/


--Script in ServerScriptService local MainSound = workspace.MainSound local Next = script.Next local MarketplaceService = game:GetService("MarketplaceService")

math.randomseed(tick())

while true do game.ReplicatedStorage.Remotes.SongRequest.OnServerEvent:connect(function(plr,id) table.insert(Requests,id) end) if Requests[1] ~= nil then MainSound.SoundId = ("rbxassetid://"..Requests[1]) game.ReplicatedStorage.Remotes.PleaseWork:FireAllClients(Requests[1]) for i,v in pairs(Requests)do for i = 1,#v do table.remove(Requests,i) end end else local chosen = math.random(1,#List) MainSound.SoundId = ("rbxassetid://"..List[chosen]) print(List[chosen]) game.ReplicatedStorage.Remotes.PleaseWork:FireAllClients(List[chosen]) end MainSound:Play() MainSound.Ended:wait() end

--Script in GUI function getInfo(id) print("Played") local Info = game:GetService("MarketplaceService"):GetProductInfo(id) script.Parent.Text.Text = ("Current song: "..Info.Name..", Creator: "..Info.Creator.Name..", Id: "..Info.AssetId..", Sales: "..Info.Sales) end game.ReplicatedStorage.Remotes.PleaseWork.OnClientEvent:connect(getInfo)~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~

0
use code blocks please greatneil80 2647 — 6y
0
He did. hiimgoodpack 2009 — 6y
0
Do you not read over what you post to make sure it looks nice for the public? hiimgoodpack 2009 — 6y
0
See the two lines of ~~~s at the end of your post? Put one of them before your code starts and leave the other one after it ends to put it in a code block. chess123mate 5873 — 6y

Answer this question