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

"Head is not a valid member of model." Fix?

Asked by 8 years ago
local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()

local Orb = Instance.new("Part", Character)
local Decal = Instance.new("Decal", Orb)
Decal.Texture = "http://www.roblox.com/asset/?id=76307689"
Orb.Name = "Orb"
Orb.CanCollide = false
Orb.BrickColor = BrickColor.new("Pearl")
Orb.Size = Vector3.new(2.8,4,2.8)
Orb.Transparency = 1

local Weld = Instance.new("Weld", Orb)
Weld.Part0 = Character.Head
Weld.Part1 = Orb
Weld.C1 = CFrame.new(2,2.4,0)

The error occurred on line 14, I do not know how I can fix this problem. Also, this script works on play in studio but not on a server.

0
Use WaitForChild; Weld.Part0=Character:WaitForChild("Head") SimplyRekt 413 — 8y

Answer this question