So I made 2 scripts for a button, the 1st one is a serverscript and changes the color of a part, and then the serverscript fires a RemoteEvent for all client(it should show GUI to clients).
The only problem is, when I try to pass a parameter to the FireAllClients() function, I get a warning saying "unknown global"
here's the serverscript:
button.ClickDetector.MouseClick:Connect(function()
if not wasItClick then
wasItClick = true
local fire = Instance.new("Fire")
fire.Color = workspace.TweenButton.Part.Color
fire.Parent = workspace.TweenButton.Part
game.ReplicatedStorage.MakeGUiAppear:FireAllClients(parameter)
wait(2)
wasItClick = false
end
end)
localscript:
local frame = script.Parent
game.ReplicatedStorage.MakeGUiAppear.OnClientEvent:Connect(function()
frame.Visible = true
wait(2)
frame.Visible = false
end)
I'm new to scripting, and I've never really done anything involving RemoteEvents before, so if anybody could point out the errors in my code, I would really appreciate it

3 comments
(parameter) has no global value and is not a local variable. You also forgot to add the player when firing all clients. Check my response for more information.
*Nevermind the Second Sentence about adding player
Can you give us the full code?