I’m trying to get a brick to change color when the player activates a RemoteEvent when they click, and I’ve proven that the RemoteEvent is indeed firing, but it seems that since both the RemoteEvent and the script to receive it are both in a tool, the script isn’t seeing the RemoteEvent being fired.
– Here is the LocalScript firing the RemoteEvent
```` local Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Button1Down:Connect(function()
if MegidolaonButton.Visible == true and MegiPlacer.parent == workspace then
print("event should fire")
megiEvent:FireServer() -- look at this!
elseif MegidolaonButton.Visible == false and MegiPlacer.Parent ~= workspace then
print("Event should not fire!")
end
end)
and here is the Server Script to receive it
````local ReplicatedStorage = game:GetService('ReplicatedStorage')
MegiEvent = script.Parent.MegiEvent
local MegidolaonPlacer = game.Workspace:WaitForChild("MegidolaonPlacer")
local MegidolaonPlacerPosition = MegidolaonPlacer.Position
local function megidolaon()
game.Workspace.PartForMegiEventTest.BrickColor = BrickColor.Black()
print("boom!")
script.Parent.MegiEvent.OnServerEvent:Connect(megidolaon)
end
I’m pretty sure this has something to do with how the RemoteEvent and Server Script are failing to communicate since they’re both in a tool, but I don’t understand what it is that makes that so.