Hey! I was wondering what was happening in my Shop system. Mainly because whenever I load in a screen to preview it puts everything on correctly, but it doesn’t give the person hair? I think it has something to do with the dummy being in a viewport frame, because it works totally fine when I load it on the player.
Here is my code for loading the skin on:
local object = viewportFrame.Dummy
object.HumanoidRootPart.Position = Vector3.new(0, 0, 0)
object.Parent = viewportFrame
local viewportCamera = viewportFrame:FindFirstChildOfClass("Camera") or Instance.new("Camera")
viewportFrame.CurrentCamera = viewportCamera
viewportCamera.Parent = viewportFrame
viewportCamera.CFrame = CFrame.new(Vector3.new(0, 2, 6), object.HumanoidRootPart.Position)
if currentType.Value == "Emotes" then
local anim = object.Humanoid:LoadAnimation(script.Parent.Animation) --object.Humanoid.Animation)
anim.Priority = Enum.AnimationPriority.Action
anim.Looped = true
anim:Play()
print("Heheh")
elseif currentType.Value == "Skins" then
game:GetService("ReplicatedStorage").Events.ChangeShopSkin:FireServer(object, itemsDict[currentType.Value][currentItem.Value].Name)
end
I used your code in mine and nothing happened, I also tried cloning the hair manually, I honestly don’t know what to do at this point. Is it just a studio bug?
no, its proper that you have it in the playergui by default, as thats what i have on my own customization system too (i had bugs cloning it from workspace–related to accessories)
Is the hair a custom made accessory or is it from roblox catalog?
you also don’t have to do this but it could help by sending a demo file so i could test it, i can only eyeball it at this point since everything is in accordance to how it should be
another suggestion would be instead of passing the dummy as an object, let the server just access the dummy via player
snippet from my own code
EquipOnDummy.OnServerEvent:Connect(function(player)
Designation = player.PlayerGui.Shop.ViewportFrame.ViewportFrame.WorldModel.Dummy
--add accessory manually or do humanoid desc
local AccessoryClone=Hair:Clone()
Designation.Humanoid:AddAccessory(AccessoryClone)
--...
also ignore viewportframe.viewportframe, its just the way i have the thing made, i have a frame called vpf and a vpf called vpf