Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I want group memebrs to spawn in a location. But the script aint woking pls help?

local id = 5174732
game.Players.PlayerAdded:Connect(function(Plr)
    if Plr:IsInGroup(id) then
        Plr.CharacterAdded:Connect(function(character)
            character.UpperTorso.Position = Vector3.new(-2658.687, 7.604, 19.582)
        end)
    end 
end)

1 answer

✓ Accepted answer

You should use HumanoidRootPart instead since its a root part of a model character. And here is a better code:

local id = 5174732
game.Players.PlayerAdded:Connect(function(Plr)
    if Plr:IsInGroup(id) then
        repeat wait(1) until Plr.Character
        Plr.Character.HumanoidRootPart.Position = Vector3.new(-2658.687, 7.604, 19.582)
    end 
end)

1 comment

0

i have this error 03:22:57.404 - user_Group-Based-Auto-Team-Script.rbxm.Group-Based Auto-Team Script:12: attempt to index nil with 'GetRankInGroup'

This discussion is preserved as it was. New answers, comments, and votes are closed.