Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Ma02rc 4
7 years ago

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

0
For server-server events you can use BindableEvents Vulkarin 581 — 7y

1 answer

Log in to vote
0
Answered by
Eqicness 255 Moderation Voter
7 years ago

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

0
Whoops! I guess I got my `remotes confused with my `bindables Ma02rc 4 — 7y
Ad

Answer this question