The title, idk if it is the issue. i stuck a script so when a player joined, it would stick a helmet on their head.
local Helmet = game.Workspace.Helmet wait(1) local weld = Instance.new("Weld", game.Workspace) weld.Part0 = game.Workspace.Helmet weld.Part1 = game.Players.LocalPlayer.Character.Head
The helmet IS a model. idk if that changes anything. my output says bad cast, and brings me to line 7 when i click on it. anyone able to help?
No, you cannot weld models themselves. You should first weld all the parts in the model together, then weld one part in the model to the character's head.
Here's a weld script I made a while back, feel free to use and manipulate it to make it work for you. Please leave an upvote if I helped! :)
local prev local parts = script.Parent:GetChildren() for i = 1,#parts do if ((parts[i].className == "Part") or (parts[i].className == "Handle") or (parts[i].className == "UnionOperation")) then if (prev ~= nil) then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev parts[i].Anchored = false end prev = parts[i] end end for _,item in pairs(script.Parent:GetChildren()) do if item:IsA("UnionOperation") or item:IsA("Part") then item.Anchored = false end end