Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

player:LoadCharacter() is not working? (SOLVED)

Asked by 5 years ago
Edited 5 years ago

Hello. I am creating team-change gui and i want to do quick respawn. The rest of script is working correctly only player:LoadCharacter() is not working.

local color = "Sand green"
local group = 4384871
local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
    if player:IsInGroup(group) then
    player.TeamColor = BrickColor.new(color)
    player:LoadCharacter()
    script.Parent.Parent.Parent.Visible = false
    end
    end)
0
You're calling this from a GUI, so I imagine you're trying to do this all locally? You need to handle this all on the server. LoadCharacter, specifically, won't work from the client as well. Rocketerkid 237 — 5y
0
so how i can do that with button? MiniPolak 7 — 5y
0
thank you MiniPolak 7 — 5y
0
No problem. If you have issues understanding remotes, feel free to ask in the Site Chat or the Discord. They can be a bit daunting. Good luck. Rocketerkid 237 — 5y

Answer this question