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

What is wrong with my FakeHead script?

Asked by 10 years ago

I had done a few tests to get it working, but nothing is working, it only makes the FakeHead but it doesn't set the BrickColor of the original Character's Head, doesn't do it with the face either, and doesn't do it with the Character's Head mesh. Here is the script;

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if char and char:FindFirstChild("Head")and char.Head:FindFirstChild("face")then
Modeled=Instance.new("Model",char)
Modeled.Name=""
FakeHead=char.Head:Clone()
FakeHead.Parent=Modeled
FakeHead.Name="Head"
Humaned=Instance.new("Humanoid",Modeled)
Humaned.Name="FakeHead"
Humaned.Health=0
Humaned.MaxHealth=0
weld=Instance.new("Weld",FakeHead)
weld.Part0=char.Head
weld.Part1=FakeHead
char.Head.Transparency=100
char.Head.face.Transparency=100
char.Head.face:Destroy()
end end)end)

1 answer

Log in to vote
1
Answered by 10 years ago

One thing you might want to do is make the ends in-line, since the way you have it declares one phrase only.

end
end)
end)

and before variables Instance (like Modeled) add a local:

local Modeled = Instance.new("Model") -- No ', char'
Modeled.Parent = char -- This way

Try that for other variables too. I think that is the prob.

0
Ok, I'll try and see what happens. TheeDeathCaster 2368 — 10y
0
Didn't work. :/ TheeDeathCaster 2368 — 10y
0
tell me what you see in output marcoantoniosantos3 200 — 10y
0
Nothing is coming up in the Output at all, in Online nor in Play Solo Mode, I wonder why the script isn't working, or why it isn't giving me any Errors in the Output? TheeDeathCaster 2368 — 10y
View all comments (2 more)
0
Remove the weld since it isnt needed at all, but tell me, what isn't working? marcoantoniosantos3 200 — 10y
0
The Weld is needed, otherwise it won't Stick with the head while the Character is walk and moving around, and the problem is that it isn't Cloning the Head correctly, When it clones the Head it doesn't have the same Head Color, Face, nor Mesh as the original. TheeDeathCaster 2368 — 10y
Ad

Answer this question