Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why dosent this script work?

I'm trying to make the hat weld to your head, but this script isn't working. Can anyone help me? This is a local script.

local player = game.Players.LocalPlayer
local c = player.Character
local humanoid = c.Humanoid
local h = c.Head
local t = c.Torso
local ra = c["Right Arm"]
local la = c["Left Arm"]
local rl = c["Right Leg"]
local ll = c["Left Leg"]

function  hat()
	if player.c.Name == "DigitalZer3" then
		local hat = script.Parent.DominusV2.Handle
		hat.CFrame = h.CFrame		
	end
	
end

2 comments

0

Lacryma, if you know anything about it please correct the script. i will look into it. Thanks alot.

1 answer

✓ Accepted answer

Might be worth actually calling the function?

local player = game.Players.LocalPlayer
local c = player.Character
local humanoid = c.Humanoid
local h = c.Head
local t = c.Torso
local ra = c["Right Arm"]
local la = c["Left Arm"]
local rl = c["Right Leg"]
local ll = c["Left Leg"]

function  hat()
	if player.c.Name == "DigitalZer3" then
 		local hat = script.Parent.DominusV2.Handle
		hat.CFrame = h.CFrame
	end
end

hat()

You will also need to change the parenthood of the hat to the Player's character.

This discussion is preserved as it was. New answers, comments, and votes are closed.