So, I have a series of scripts using a remove event, and the only part of the event that doesn't work is changing the value of an IntValue.
The first script, which fires when you touch a part:
local event = game.ReplicatedStorage.OpenDoors local DoorVal = 1 script.Parent.Touched:connect(function(hit) if (hit.Parent) and (hit.Parent:FindFirstChild('Humanoid')) then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if (Player) then event:FireClient(Player, "Door", DoorVal) end end end)
It's basically sending a "Door" and a number to the client.
So then, it gets to here,
event = game.ReplicatedStorage.OpenDoors event.OnClientEvent:connect(function(...) local tuple = {...} if tuple[1] == "Door" then script.Parent.DoorValue.Value = tuple[2] script.Parent.Label.Visible = true else if tuple[1] == "DoorStop" then script.Parent.DoorValue.Value = 0 script.Parent.Label.Visible = false end end end)
It does not register the tuple[2] as the DoorValue in the IntValue, and I know this is the error, because when I manually set it to 1 and test it in game, it works like a charm. Why isn't it registering tuple[2] as an IntValue?