[GG, I didn't deserve a thumbs down because this is a question, and follows the guidelines.] [One month mark and still waiting; Yayyyyyy!]

Background Information: FilteringEnabled is on. I'm using a RemoveEvent to send Data between the Server and the Client. The number gets transferred, but the IntValue value doesn't change. The IntValue is in the Gui with the Client Localscript. It does not work with FilteringEnabled off. The Gui does show up, so it is being called. It is NOT an error with the DoorStop. I've tried :ToNumber and changing the value itself to a Real.

Okay, so I have a brick, so that when you do indeed touch it, it sends a Client event to the player, that part works. However, the number transfers, but the IntValue does NOT change. Whether it's from me referencing the IntValue wrong, or it's an issue with it in general.

My script is below:

event = game.ReplicatedStorage.OpenDoors

DoorVal = script.Parent.DoorValue

event.OnClientEvent:connect(function(...)
local tuple = {...}
if tuple[1] == "Door" then
DoorVal.Value = tuple[2]
script.Parent.Label.Visible = true
elseif tuple[1] == "DoorStop" then
DoorVal.Value = 0
script.Parent.Label.Visible = false
end
end)

This is where the error resides, because I've manually changed the value (I.E: Changing the value, saving the game and going in game/Changing it then Play Solo.) and it worked. Please help, and thanks in advance.

5 comments

0

Have you tried manually firing the event with the proper data?

0

Yes, I have. "I've manually changed the. value (I.E: Changing the value, saving the game and going in game/Changing it then Play Solo.) and it worked"

0

I don't think you can store "..." as a variable. Try replacing the "..." with "tuple."

0

The "..." is correct. "..." just collects the remainder of the arguments passed as an array, then you need to capture it into a table. Make it an OnServerEvent, if that code is in the Server. And add a 'player' argument before the '...' argument. Also fire the event using :FireServer(...)

0

It fires the KeyDown event in another script, and it works.