Im currently working on an adminsystem and whenever the the script runs into an error it sends a variable from a localscript to a serverscript and the serverscript then sends it into another localscript.
When the variable is sent to the serverscript its entirely fine, but when the serverscript then sends it to the other localscript it just becomes “nil” for whatever reason making it useless for me. I have no clue how it could lose its value when its transfered the second time.
Serverscript:
event.onServerEvent:connect(function(player, message)
print(message)
event2:FireClient(player, message)
end)
Localscript:
event.onClientEvent:connect(function(player, message)
if debounce == true then
debounce = false
script.Parent.Text = message
script.Parent.Parent.Notif:Play()
script.Parent.Parent:TweenPosition(UDim2.new(0.867, 0,0.849, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.5)
wait(5)
script.Parent.Parent:TweenPosition(UDim2.new(1.867, 0,0.849, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.5)
wait(0.6)
debounce = true
end
end)
and this is the error that I get: “Players.Flauschi_XD.PlayerGui.Notification.Frame.TextLabel.LocalScript:7: invalid argument #3 (string expected, got nil)”
Which refers to script.Parent.Text = message