Hi, I’ve been trying to make a simple team change gui with a RemoteEvent. I had two arguments for the RemoteEvent to get from the onServerEvent
LocalScript on TextButton
script.Parent.MouseButton1Up:Connect(function(plr)
local team = "Miner"
game.ReplicatedStorage.Teamchange:FireServer(plr, team)
end)
From what I understand the RemoteEvent should get the player and the string for “Miner”. This is what I did for the server-side script
game.ReplicatedStorage.Teamchange.OnServerEvent:Connect(function(plr, team)
if team == "Miner" then
plr.Team = game.Teams.Miners
plr:LoadCharacter()
print(plr, team)
elseif team ~= "Miner" then
print("not a miner")
print(plr, team)
end
end)
I’ll have more elseif options in the future, just made the not miner as a debug option. Now when I activate onServerEvent, the string variable didn’t transfer, and I instead get part of a UDim2 offset coordinate instead (I think).
Output for print(plr, team) Kuevert 496
I have no idea why offset would be sent instead of the string variable I specifically put in instead.