I am making a door that when you enter changes a value saved in the "PlayerGui", I did it with RemoteEvents. When I test it online it says "FireServer can only be called from the client"
Server Script
script.Parent.Touched:connect(function(hit)
if hit.Parent == nil then return end
local h = hit.Parent:FindFirstChild("Humanoid")
if h then
local basein=game.ReplicatedStorage:WaitForChild("basein") basein:FireServer()
end
end)
*Server Script (This script is in "ServerScriptService") *
basein=Instance.new("RemoteEvent", game.ReplicatedStorage)
basein.Name="basein"
basein.OnServerEvent:connect(function(player)
player:WaitForChild("PlayerGui"):FindFirstChild("ADframe").Value = "Base"
end)
