Hello!
I was just thinking of making a auto-morph script for my game. It would give the player a specific morph on a certain team, if they are a following rank in my roblox group(s). Is there like any chance on someone helping me with it?
I also tried this tutorial as well (https://youtu.be/-EK_MKbRFEo?si=i5IuzNJAsrv_MmH_), however, it is not quite what I was looking for (It is for all players, not certain teams, and gives only clothes, not accessories.
I would appreciate if anyone could help me with that.
Hey there! So this is a basic script to add it via rank in group:
local groupId = 0;
local minRankId = 0
local Folder = game.ServerStorage:WaitForChild(“Accessories”)
game.Players.PlayerAdded:Connect(function(plr)
if plr:GetRankInGroup(groupId) >= minRankId then
plr.CharacterAdded:Connect(function(char)
plr:CharacterAppearanceLoaded:Wait()
for _, accessories in pairs(Folder:GetChildren()) do
if accessory:IsA(“Accessory”) then
if accessory:FindFirstChils(“Handle”) then
for _,att in pairs(accessory.Handle:GetChildren()) do
if att:IsA(“Attatchment”) then
warn(“Attatchment Name: “ att.Name)
end
end
else
warn(“No Handle”)
end
plr.Character:WaitForChild(“Humanoid”):AddAccessory(accessory)
else
warn(“no attatchment”)
end
end
end
end)
end)
Sorry that it’s not properly done, I made this on my phone but it should work.
The basic script did not work, so I asked ChatGPT for help - did not work either.
This is what GPT provided me with:
local groupId = 14807185
local minRankId = 5
local Folder = game.ServerStorage:WaitForChild("Test Fedora")
game.Players.PlayerAdded:Connect(function(plr)
if plr:GetRankInGroup(groupId) >= minRankId then
plr.CharacterAdded:Connect(function(char)
plr.CharacterAppearanceLoaded:Wait()
for _, accessory in pairs(Folder:GetChildren()) do
if accessory:IsA("Accessory") then
if accessory:FindFirstChild("Handle") then
for _, att in pairs(accessory.Handle:GetChildren()) do
if att:IsA("Attachment") then
warn("Attachment Name: " .. att.Name)
end
end
else
warn("No Handle")
end
plr.Character:WaitForChild("Humanoid"):AddAccessory(accessory)
else
warn("Not an attachment")
end
end
end)
end
end)
I still do not know what the case here is.
Is it giving you any errors for either script?
Both just does not work, I did not check the console tho.
Okay check the console and let me know if there’s any errors.
Not sure is this important, but it says
“qWeld - Unable to weld part”
I found this script on devforum, maybe try using this (it won’t do it based on rank or team, but it’s a basic start just to see if this works)
local FolderWithAccessories = game.ServerStorage:WaitForChild("AccessoriesFolder")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
player.CharacterAppearanceLoaded:Wait()
for _, accessory in pairs(FolderWithAccessories:GetChildren()) do
if accessory:IsA("Accessory") then
char:WaitForChild("Humanoid"):AddAccessory(accessory)
end
end
end)
end)
Credit to this post
Does not work.
(I tried with R15 and R6)
local FolderWithAccessories = game.ServerStorage:WaitForChild("fasthelmet")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
player.CharacterAppearanceLoaded:Wait()
for _, accessory in pairs(FolderWithAccessories:GetChildren()) do
if accessory:IsA("Accessory") then
char:WaitForChild("Humanoid"):AddAccessory(accessory)
end
end
end)
end)
Try creating a folder, call it “Accessories”, but the model you want to connect into there and in the Folder name on the script, put the name of the folder in the WaitForChild variable
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.