are you at the rank that is required?
Yes I did a test by joined with other account.
No its not cloning can you do something?
Try printing Musket. If it is not cloning, Musket doesnât exist or some other thing is happening
Try to make a if statement
if musket then
print("musket is here")
end
Are you sure Teams is defined? If not then make sure you have defined the âTeamsâ variable and assigned it to the correct team service. If not, you need to retrieve the Teams service before using it.
we told that before, i think its not the issue here
I fixed that but still nothing,
Nope nothing I think that will never be solved
Then try debugging using my sample
if playerRank <= 1 then
local guardTeam = Teams:FindFirstChild("Presintential Guard")
if guardTeam then
player.Team = guardTeam
local musket = ReplicatedStorage:FindFirstChild("Musket") -- Musket has to be accessible
if musket then
local clone = musket:Clone()
clone.Parent = Bp
print("Musket added to backpack")
else
warn("Musket not found in ReplicatedStorage")
end
else
print("Guard team not found")
end
elseif playerRank >= 2 then
player.Team = Teams:FindFirstChild("Member Of The Greeks Parliament")
elseif playerRank >= 3 then
player.Team = Teams:FindFirstChild("Chiefs Of The Greek Presintential Guard")
elseif playerRank >= 255 then
player.Team = Teams:FindFirstChild("Prime Minister")
end
end
The problem might be in whats happening on those lines check the output
Then musket doesnât exist. If it is not printing musket exists, then musket is not a valid member of RP
Thatâs why i sent him his debugged code version. Probably the musket is not being correctly accessed from ReplicatedStorage or actually doesnât exists as you are saying
âŚNothingâŚMy âŚtopic is UNSOLVEABLE
Then it might be how PlayerAdded event is connected with your function. Also arenât you using a LocalScript, are you?
No am not because its in serverscript service
Try debugging the player role
local playerRank = player:GetRankInGroup(33119741)
print(player.Name .. "'s rank:", playerRank) -- Debug output to check player's rank
-- below the playerRank add the line above and run the game