I have a clothing store in my game however the hats do not fit on to the player correctly when I clone them:
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player,choice) if choice == dialog.GreenHat then game.ReplicatedStorage.GHat:Clone().Parent = player end end)
It always appears on the shirt of the player instead of the face of the player. How do I fix this problem ?
if you are still having this problem,here is why:
on line 4
, you set the parent to the player
game.ReplicatedStorage.GHat:Clone().Parent = player
what you need to do is set the parent to the player's Character
local cara=game.Workspace:FindFirstChild(player.Name) game.ReplicatedStorage.GHat:Clone().Parent = cara
so the full new code would be:
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player,choice) if choice == dialog.GreenHat then local cara=game.Workspace:FindFirstChild(player.Name) game.ReplicatedStorage.GHat:Clone().Parent = cara end end)
glad this helped,
lukeb50