basically im making a game, and the guns i use force shiftlock, so i cant use mouse clicking to change teams, so i use a hotkey to do it, it looks like you changed team but thats only on your screen for some reason, because your actual team is your previous team, how i know is because i spawn on the wrong spawn
THIS IS ON A LOCAL SCRIPT
local player = script.Parent.Parent.Parent.Parent.Parent
local mouse = player:GetMouse();
mouse.KeyDown:connect(function(key)
if key == "n" then -- Change key to whatever you want
player.Character.Humanoid.Health = 0
wait(5)
player.Team = game.Teams:FindFirstChild("Immigrants")
end
end)
TIPS:
-- i used a Regular Script, but the code has an error on mouse.KeyDown:connect(function(key) bit
-- i tried template free models, they didn't help

1 comment
Use Remote Events