How do I fix FireServer can only be called from the client?
Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).
So Im making a script where when you click the water it fires a remote event and it keeps on saying FireServer can only be called from the client at line 9.How do I fix it?
01 | local water = script.Parent |
02 | local ReplicatedStorage = game.ReplicatedStorage |
03 | local waterEvent = ReplicatedStorage:WaitForChild( "RemoteEventWater" ) |
04 | local cd = water.ClickDetector |
06 | cd.MouseClick:connect( function (plr) |
07 | print (plr.Name.. " Has Clicked the water" ) |
08 | water.Transparency = 1 |
09 | waterEvent:FireServer() |
10 | print ( "Server has been fired" ) |
14 | if water.Transparency = = 1 then |