local player = game.Players.LocalPlayer
local replicatedStorage = game:GetService("ReplicatedStorage")
local GUI = script.Parent
replicatedStorage.remeve.OnClientEvent:Connect(function(Boolean)
if Boolean and GUI then
GUI.Enabled = Boolean
end
end)
This LocalScript inside the ScreenGui is supposed to appear when a player steps on a part, then dissapear when the player walks away from the part. It says fireserver can only be activated by the client for the error, the error comes from this script using the remote event too thats in the part:
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
game:GetService("ReplicatedStorage").remeve:FireServer(player,true)
end
end)
part.TouchEnded:Connect(function (hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
game:GetService("ReplicatedStorage").remeve:FireServer(player,false)
end
end)

5 comments
ok so the only error that pops up is that fire server can only be fired by client, thats probably why it does not work
Oh I'm sorry, I made a typo
It should be FireClient, not fireserver, try now
ok, it now becomes visible, but now cant become invisible when u leave the part
ok, it now becomes visible, but now cant become invisible when u leave the part