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

Your title should be specific! Describe your problem concisely?

Asked by 5 years ago

I tried making an auto morph for a group of mine, and it randomly works and doesn't work.

Excuse my title, I kept getting 'Your title should be specific! Describe your problem concisely.'

Here's my script:

game.Players.PlayerAdded:Connect(function(player)
    if player:IsInGroup("5058689") then
        print("Check")
        local ranks = {
        Emperor = 255,
        Empress = 254,
        Architect = 253,
        Praetor = 252,
        Centurion = 251,
        Legionary = 250
            }

        if player:GetRankInGroup("5058689") == ranks.Emperor then
            local starterEmperor = game:GetService("ServerStorage").StarterEmperor
            print("test")
            local clone = starterEmperor:Clone()
            print("ye")
            clone.Name = "StarterCharacter"
            print("yee")
            clone.Parent = game.StarterPlayer
            print("yeeet")
        end

        if player:GetRankInGroup("5058689") == ranks.Architect then
            local starterArchitect = game:GetService("ServerStorage").StarterArchitect
            local clone = starterArchitect:Clone()
            clone.Name = "StarterCharacter"
            clone.Parent = game.StarterPlayer
        end

        if player:GetRankInGroup("5058689") == ranks.Praetor then
            local starterPraetor = game:GetService("ServerStorage").StarterPraetor
            local clone = starterPraetor:Clone()
            clone.Name = "StarterCharacter"
            clone.Parent = game.StarterPlayer
        end

        if player:GetRankInGroup("5058689") == ranks.Centurion then
            local starterCenturion = game:GetService("ServerStorage").StarterCenturion
            local clone = starterCenturion:Clone()
            clone.Name = "StarterCharacter"
            clone.Parent = game.StarterPlayer
        end

        if player:GetRankInGroup("5058689") == ranks.Legionary then
            local starterLegionary = game:GetService("ServerStorage").StarterLegionary
            local clone = starterLegionary:Clone()
            clone.Name = "StarterCharacter"
            clone.Parent = game.StarterPlayer
        end
    end
end)

Also, if you want to join it join DM me AaronWilhelm#0475 on discord.

1 answer

Log in to vote
0
Answered by
SmartNode 383 Moderation Voter
5 years ago

// Try to not make the numbers into strings, make it a regular number.

Correct Example: game.Players.builderman:IsInGroup(1051842)

Wrong Example: game.Players.builderman:IsInGroup(“1051842”)

// Also, if your applying a morph directly to one player, I have no idea why your using game.StarterPlayer For one, it’s not accessible (it’s only for local scripts)

0
Is there a way to morph the player otherwise? AaronWilhelm -2 — 5y
0
I would recommend humanoid descriptions but this is a new type of feature for the roblox library (I believe there isn’t even a documentation yet), I’m not an expert on morphing so I wouldn’t know much but if you look at different morphing systems you can recreate their techniques. SmartNode 383 — 5y
0
The only thing wrong with humanoid descriptions are that I have welded shields to their arms. AaronWilhelm -2 — 5y
0
It works in studio now but now in game. AaronWilhelm -2 — 5y
View all comments (2 more)
0
Just do a combination and see what works best together SmartNode 383 — 5y
0
Would you like me to send you the tc AaronWilhelm -2 — 5y
Ad

Answer this question