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

How do I fix cannot FireServer when trying to fire a Remove Event?

I just got introduced to what are Remove events and I tried my own I did everything but I'm still getting this error saying it can't fire this server.

local Invisible = true

local UnInvisible = false

local RE1 = script:WaitForChild("Invisible")

local RE2 = script:WaitForChild("Uninvisible")
game:GetService("UserInputService").InputBegan:connect(function(input, gamepor)
if (input.KeyCode == Enum.KeyCode.Q) and Invisible == true then 
	script.RE1:FireServer() 
	UnInvisible = false
	wait(40)
	script.RE2:FireServer() 
	Invisible = false
	UnInvisible = true
end

end)

1 answer

✓ Accepted answer

Are you sure this is a LocalScript? If no, change it to :FireClient(player) instead. Also you need to get the player parameter by accessing game:GetService("Players").PlayerAdded. Since you cannot run the script by not locating anyone and the script will be like: "Who would I send this event to?" and sends back an error. Instead, if you use :FireAllClients() you don't need to put anything in the bracket if you don't have any additional informations for the other script.

If this does not work, you can try putting a print statement inside the line 9. So it make sure it runs through.

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