So I spend a few hours designing a Draw Gun and Holster Gun System (i designed it in an empty baseplate and when it was finished i moved it to my main game)
It worked perfectly as i wanted it to in the empty baseplate
But in my main game it didnt work
The pistol which was in replicatedstorage along with the holster accessory was not even appearing in the inventory ( ive made a code in severscriptservice which puts the pistol tool into the inventory)
Neither the holster was appearing on the player
My game uses a starter character so that it matches the vibe of the game
But i discovered the main issue was the Starter Character , i removed it and realized that the system was working fine
So how can i fix this
I wanna make that holster system work with my starter character
Here is a link to my model which i made you can use it and test it and let me know if you found any solutions
Any help is appreciated
Thanks
You used CharacterAppearanceLoaded in GameMgr. Though, it has been known that it’s an Engine bug that Roblox Studio doesn’t properly handle CharacterAppearanceLoaded in combination with having a custom StarterCharacter in StarterPlayer I changed said GameMgr script just slightly and it worked perfectly for me:
GameMgr before change:
local players = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local hosterAcc = rs:WaitForChild("Holster")
local gun = rs:WaitForChild("Pistol")
players.PlayerAdded:Connect(function(player)
player.CharacterAppearanceLoaded:Connect(function(char)
local holsterAccClone = hosterAcc:Clone()
local hum = char:WaitForChild("Humanoid")
hum:AddAccessory(holsterAccClone)
local gunClone = gun:Clone()
gunClone.Parent = player.Backpack
end)
end)
My edited version of GameMgr:
local players = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local hosterAcc = rs:WaitForChild("Holster")
local gun = rs:WaitForChild("Pistol")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local holsterAccClone = hosterAcc:Clone()
local hum = char:WaitForChild("Humanoid")
hum:AddAccessory(holsterAccClone)
local gunClone = gun:Clone()
gunClone.Parent = player.Backpack
end)
end)
I just used the CharacterAdded event and it worked.
Thanks Man I appreciate the help