How to fix Remote Event not enabling/disabling bool value?

Hello again! I’ve been trying to use Remote Events to enable and disable a bool value in PlayerGui. For some reason, it doesn’t work. I am using the script below:

DisablePlace.OnClientEvent:Connect(function()
	local CanPlace = script.Parent:FindFirstChild("CanPlace").Value
	CanPlace = false
end)

EnablePlace.OnClientEvent:Connect(function()
	local CanPlace = script.Parent:FindFirstChild("CanPlace").Value
	CanPlace = true
end)

Please note that the script is also located in PlayerGui.
Thanks!

I see no problems with that, so I suspect the problem might be on the server. Could you show me the script where it fires that remote event to the client?

1 Like

Get rid of the .Value here and move it to the next line. What’s happening is that you’re not changing the value, you’re changing the variable.

1 Like

Nevermind, found out that there’s an issue in another script and this one works fine. Thanks anyways!

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