if ScreenGUI.SpectateFrame then
if ScreenGUI.SettingOptions.Visible == true then
ScreenGUI.SettingOptions.Visible = false
end
if ScreenGUI.SpectateFrame.Visible == false then
SpectateEvent:FireClient(player, true)
ScreenGUI.SpectateFrame.Visible = true
else
ScreenGUI.SpectateFrame.Visible = false
SpectateEvent:FireClient(player, false)
end
else
warn("Spectate frame not found.")
end
end)```
#I don't understand why the "true" remained nil
1 messages · Page 1 of 1 (latest)
SpectateEvent:FireClient is what I'm referring to
spectate.OnClientEvent:Connect(function(Player, Boolean)
print(player, Boolean)
end)
here's what the onclientevent is like
you don’t need to include player as the first parameter with OnClientEvent
Player is only the first with FireClient because it’s using it to tell which one it’s firing an event for
ooh gotcha, thanks
** You are now Level 6! **
Every parameter after that is what’s being read so you would do
spectate.OnClientEvent:Connect(function(Boolean, …)