Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hair isn't cloning and welding to the player upon spawn(?)

Asked by 2 years ago
Edited 2 years ago

SOOOOOOOO I know this is going to look meh, this is what I remember from two years ago as a scripter.

No output is showing and its driving me crazy how I can't get this hair to weld to my characters head upon spawn.

Also if there is a better way to weld please help me out for this always takes me forever to find the angles and everything in order to place the object on my head nice and neatly

local RS = game:GetService'ReplicatedStorage';
local Hairs = RS.Assets.Hairs

local Dict = {
    [1] = Hairs.Hair1
}

game:GetService'Players'.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Char)
        delay(.5,function()
local Hair = Dict[1]:Clone()
Hair.Parent = Player.Character
Hair.Name = 'Hair'
local w = Instance.new'Weld'
w.Part0 = Char.Head
w.Part1 = Hair
w.C0 = w.Part1.CFrame:toObjectSpace(w.Part0.CFrame*CFrame.new(.2,.7,0))
end)
end)
end)
0
did u put this in local script or just a script and u forgot to put some parenthesis in like 8 at players kidsteve923 139 — 2y
0
Parenthesis aren't really needed for that function, but its in a server script in serverscriptservice KnockOfScripting 0 — 2y
0
Please use parenthesis where you are suppose to use them. And I've never really used Welds, but you're not setting the parent, if that has any impact Spjureeedd 385 — 2y
0
Didn't realize I didn't parent the weld wow... Thank you KnockOfScripting 0 — 2y

Answer this question