if plr and not plr.Character then
if roles:FindFirstChild(role) then
local newCharacter = roles[role].RoleCharacter:FindFirstChildOfClass("Model"):Clone()
newCharacter.Name = plr.DisplayName
plr.Character = newCharacter
newCharacter.Parent = workspace
for _, tool in pairs(roles[role].Tools:GetChildren()) do
tool:Clone().Parent = plr.Backpack
end
end
end
end)
The issue is coming from this line:
local newCharacter = roles[role].RoleCharacter:FindFirstChildOfClass("Model"):Clone()
sorry i didn’t read the whole script at first but try to print roles[role] and see what you got or print typeof(roles[role]) to see if it’s returning a Instance or function
you should’ve atleast shown where was roles declared the only idea i have that you have done something wrong while setting the roles try looking for that and what is even roles? or the role that the error appeared at