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

Why dosent this script work?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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

0
That is not welding. I suggest you read this: http://wiki.roblox.com/index.php?title=Welds#Welding_together_two_existing_bricks Lacryma 548 — 8y
0
Lacryma, if you know anything about it please correct the script. i will look into it. Thanks alot. digitalzer3 123 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

Ad

Answer this question