Very sorry for the late reply, here’s sections of my scripts for the event
Local script of playergui button:
local event = game.replicatedstorage.selectevent
script.parent.MouseButton1Click:Connect(function()
if script.parent.BackgroundColor3 == Color3.fromRGB(122,0,0) then
event:FireServer()
end
end
Serverscriptservice:
game.ReplicatedStorage:WaitForChild("selectevent").OnServerEvent:Connect(function(player)
game.ReplicatedStorage.selectevent:FireClient(player)
print(game.ReplicatedStorage.selectevent) --debugging attempt, but it doesn't print
end
Local script in tool:
local SelectEvent = game.ReplicatedStorage.selectevent
SelectEvent.OnClientEvent:Connect(function(player)
print("Recieved")
end
It seems you are trying to communicate from one local script to another, so instead of involving the server, I would use a BindableEvent. Also, to resolve the event not being received, have you tried temporarily remomoving the BackgroundColor3 == Color3.fromRGB(122,0,0) if statement for debugging?