New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Making Player spawn on team's spawn with team change GUI?

Asked by 10 days ago

Hello Im scripting this SCP game and I added a team select GUI. For some reason this sets the player's team but he doesn't spawn on the team's spawn points please help!

local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
    player.TeamColor = script.Parent.Information.TeamColor.Value
    script.Parent.Parent.Parent:TweenPosition(UDim2.new(-1, 0,0, 0))
    wait(1)
    script.Parent.Parent.Parent.Visible = false
    script.Parent.Parent.Parent.Parent.MainSelect.Position = UDim2.new(-1, 0,0, 0)
    wait()
    script.Parent.Parent.Parent.Parent.MainSelect.Visible = true
    script.Parent.Parent.Parent.Parent.MainSelect:TweenPosition(UDim2.new(0,0,0,0))
end)

1 answer

Log in to vote
0
Answered by 9 days ago

****If you have the same issue, it is due to it being a local script, use a global script.****

Ad

Answer this question