#how to separate script for every character?

1 messages · Page 1 of 1 (latest)

pastel grove
#

ive got a script so player loads in and characters loads in his base, but i want them to separate so all of characters spawns on the players base (stacking bug)

#
    local base = workspace:WaitForChild(player.Name .. "'s_Base")
    local standsFolder = player:WaitForChild("StandsStringFolder")

    for i = 1, 10 do
        local standValue = standsFolder:WaitForChild("Stand" .. i)
        local template = nil

        if standValue.Value == "C00lKid" then
            template = game.ServerStorage:FindFirstChild("SavedC00lKid")
        elseif standValue.Value == "CharacterFR" then
            template = game.ServerStorage:FindFirstChild("SavedCharacterFR")
        end

        if template then
            local clone = template:Clone()

            local ownerTag = clone:FindFirstChild("Owner") or Instance.new("StringValue")
            ownerTag.Name = "Owner"
            ownerTag.Value = player.Name
            ownerTag.Parent = clone

            -- OPTIONAL: Place it in player's base
            clone.Parent = base
        end
    end
end)
round haven
#

startercharacterscripts