Strange Remote Event Behavior [SOLVED]

I’m trying to use remote events to change a value from the client to the server. When the value changes for the client, the local script picks it up and fires the remote event, passing the value to change on the server. The server script picks up that server event and changes the value on the server to the value that was passed through the remote event.

Client Side Code

Camera.Changed:Connect(function()
	local screenPos, isVisible = Camera:WorldToScreenPoint(SCP173.Position)
	CanSee173.Value = isVisible
end)

CanSee173:GetPropertyChangedSignal("Value"):Connect(function()
	if CanSee173.Value == true then
		RemoteEvent:FireServer(true)
	else
		RemoteEvent:FireServer(false)
	end
end)

Server Side Code

RemoteEvent.OnServerEvent:Connect(function(player, value:boolean)
	player.Character.CanSee173.Value = value
end)

The issue is that what stated above does not happen. Instead, the value only changes for the client.
Debugging tells me that everything is fine on the client, but the server side code doesn’t pick up the server event.

A couple of things.

  1. Setting something on client is easily exploitable, especially if you allow it to replicate like this.
  2. How is the value created? It exists on the server, right?

try debugging with printing on client when the value and the camera is changed also SignalBehavior on workspace properties option can causes problem on something that use Signal thing

1 Like

I just realized that I put my server scripts in ReplicatedStorage, not ServerScriptService :expressionless:

My thanks to anyone who responded!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.