Hey everyone, I have a problem with my script. Basically the main function of this script is to add to a player custom accessory (DarkWings) from the ReplicatedStorage after player will click a gui button. For some reason it doesn't work, there might be problem with script that i created:
local playerModel = game.Players.LocalPlayer.Character local humanoid = playerModel:WaitForChild("Humanoid") script.Parent.MouseButton1Click:Connect(function() if humanoid then playerModel:AddAccessory(game.ReplicatedStorage.DarkWings) end end)
(I'm pretty new in scripting so there might some basic errors in this code) Edit.1 Console error: "AddAccessory is not a valid member of Model", and this accessory should be visible to everyone Edit.2 It works now, but there is now a problem with attachment accessory and clone function, in the handle of DarkWings model is already BodyBackAttachment but it doesn't work. Any idea how i can add clone function and attachment to this script?
Two things.
so instead of:
playerModel.AddAccessory(game.ReplicatedStorage.DarkWings)
do:
humanoid.AddAccessory(game.ReplicatedStorage.DarkWings)