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 =)