So i have a local script that fires a remote, the remote is being fired, but the value with it is not correct, instead of printing the desired value on the local, it's printing the player's name, there are the scripts related to that function:
Server
remote = script.Parent.ValueStorage:WaitForChild("SwitchModes")
remote.OnServerEvent:Connect(function(currentmode)
print(currentmode)
end)
Local (not full script)
currentmode = "Stun" -- all functions related to the value that's supposed to be sent to server.
script.Parent.ValueStorage.SwitchModes:FireServer(currentmode)
I suppose that the remote is printing the value that already comes with the remote, when its fired, the player, but its printing the name and not the player model, so i really don't know what exactly is going on. help would be appreciated...

6 comments
Thank you!
np
Hey, i have another problem, at first i thought it worked, but it seems like to be the same, what variable did you use for Player, i did game:GetService("Players").LocalPlayer, but it still prints the player name and not currentmode's value, currentmode value is definitively not the player name...
you wont need a variable to pass as the player, it will automatically find which players local script fired the server and define it for you
This video script guider made helped me out a ton: https://www.youtube.com/watch?v=4Dc_bri9mjs if you have further questions just feel free to ask
lol i found out that i inserted the variables wrong in function :v all working