Hello. I have a issue with scripting. When im in studio and i click the button on the gui on studio it makes a block partly visible to the client. Script is under here.
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent") event.OnClientEvent:connect(function(player) game.Workspace.Route25F.Transparency = .8 game.Workspace.Route25F.Script.Disabled = false end)
As you can see it changes a brick's transparency and makes a script enabled. However, When I enter the server nothing works. But i get a message from the output saying "FireClient can only be called from the server." I do not know what that means. Click script from GUI button under here. [LOCAL SCRIPT]
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent") script.Parent.MouseButton1Down:connect(function() event:FireClient(player) end)
What im trying to do is make it so when the player click the GUI Button only they can see and interact With it. Please Can I have some help?
If you're trying to create a custom Client-Client event, use a BindableEvent
. RemoteEvent
s are only for when you need to send an event over the network (Client-Server)