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

FireServer can only be called from the client explanation/fix?

Hello Scripters, I am currently having issues with the FireServer. I notice that when I test the game in the studio, the game works fine. However, when it is tested, I get the error "FireServer can only be called from the client." I have tried poking around in the script, and I didn't see any errors. If anyone could explain this error, that would be great. Here are the scripts that I am using:

TempAndMeltdown

_G.temperature = 4995
meltdowntemperature = 5000
crittemperature = 4500
unstabletemperature = 2000
_G.coresize = 4
 
while wait(3) do
    _G.temperature = _G.temperature + 5
    if _G.temperature >= meltdowntemperature then
	game.ReplicatedStorage.TempAndMeltdown01:FireServer()
	end
end

Script

game.ReplicatedStorage.TempAndMeltdown01.OnServerEvent:Connect(function()
	print("EVENT FIRED")
script.Disabled = true
script.Parent.Damager.Disabled = false
repeat
wait (0.3)
_G.coresize = _G.coresize + 0.5
script.Parent.Size=Vector3.new(_G.coresize,_G.coresize,_G.coresize)
until _G.coresize == 2000
end)

As always, your help is much appreciated. I would be a noob without you guys =)

1 comment

0

For server-server events you can use BindableEvents

1 answer

✓ Accepted answer

RemoteEvents/Functions are meant for Client and Server communication, not server-server communication. Why are you trying to fire the server from the server?

1 comment

0

Whoops! I guess I got my remotes confused with my bindables

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