FireServer() can only be called from the client, so what do I use if the server is calling the remote event? Here's a chunk of the code :
while true do--the game loop
wait(1)
local ShowGui = game.ReplicatedStorage.OpenGui--the remote event
ShowGui:FireServer()--fire the remote event(but what goes here instead?)
If I didn't explain it well enough, the script that is inside the workspace is trying to fire a remote event but it doesn't fir because it's the server trying to call it rather than a client. What do I use instead of FireServer() that the server can use? Other server script(in SSS) :
local ShowGui = game:GetService("ReplicatedStorage").OpenGui
ShowGui.OnClientEvent:Connect(function(player)
for _,plr in pairs(game.Players:GetPlayers()) do
game.ServerStorage.GUI.Regen:Clone().Parent = plr.PlayerGui
end
end)

3 comments
:FireClient(playername, arg) and .OnClientEvent(arg) or :FireAllClients(arg), .OnClientEvent(arg)
Can I leave the argument blank?
Yeah. The args are Variants, which means they can be nil (blank) as well as anything.