Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

RemoteEvent Not Responding to FireServer?

My code doesn't error on the client or the server it doesn't print 'gui' and nothing happens.

Server:

remote.OnServerEvent:Connect(function(plr,key,strings)
	if key == 'insert random key here' then
		print('gui')
		local gui = script:FindFirstChildOfClass("ScreenGui"):Clone()
		gui.Parent = plr.PlayerGui
		gui.Enabled = true
end
end)

Client

remote:FireServer(key)

3 comments

0

And yes the key is correct.

0

did you try print(key) above the condition to see what it gave you?

0

If you fire remote with 1 variable, Server catches 2 variables: 1st- player who sent event, 2nd- your variable. In server side script you try to catch remote event with 3 variables but you didn't provide 3rd. Remove "strings" variable or send it via remote event and it will work. Now server waits til he will get 3 variables to start function.

1 answer

Then, the key is probably not equal to "insert random key here"

This discussion is preserved as it was. New answers, comments, and votes are closed.