RemoteEvent not firing

Is there any reason for this event not to fire? No errors or anything either.

script.Parent.MouseButton1Click:Connect(function()
	if game.ReplicatedStorage.Gamemode.Value == 0 or 2 then
	script.Parent.bottom.BackgroundColor3 = Color3.new(0.917647, 0.933333, 0.698039)
	script.Parent.bottom.diamond.ImageColor3 = Color3.new(0.917647, 0.933333, 0.698039)
		script.Parent.bottom.diamond:TweenSizeAndPosition(UDim2.new(0.15, 0,30, 0), UDim2.new(0.425, 0,-14.5, 0))
		script.Parent.BackgroundTransparency = 0.85
		game.ReplicatedStorage.FFASelect:FireServer()
		end
end)
1 Like

it probably means the Gamemode value doesn’t equal 0 or 2, have you tried checking it?

That won’t work for some reason, try using if game.ReplicatedStorage.Gamemode.Value == 0 or game.ReplicatedStorage.Gamemode.Value == 2 then instead

1 Like

The tween and colors work, it’s just the event not firing.

can you show the script where the removeevent signal is being received? The OnServerEvent one

It doesn’t print.

game.ReplicatedStorage.FFASelect.OnServerEvent:Connect(function()
	print('fired')
	script.Parent.Value = 1
end)

is there nothing in the output?

Yep, doesn’t print or give any errors.

Could you send the hierarchy l
Of replicatedstorage

A

If the spelling is correct its mostly likely that it has an extra space in the end like:

"FFASelect "

I used to do that a lot and I used to break my head trying to figure out whats wrong. If you remove the space it should work.

And to add on, its good practice to use:

local RepStorage = game:GetService("ReplicatedStorage")

Your code is fine.
However, Scripts do not run in ReplicatedStorage. Parent your script to ServerScriptService and it should work correctly.