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

I'm trying to make a giver that puts a block on your head with a decal, can i have help please?

Asked by 8 years ago

function GiveHat() local I = Instance.new("Part") local T = script.Parent.Parent.Parent.Parent:FindFirstChild("Torso") I.CanCollide = false I.Size = Vector3.new(0.2,1,0.2) print("Part Created") I.Position = T.Position + Vector3.new(0,1,0) end

script.Parent.MouseButton1Down:connect(GiveHat) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It always says "attempt to index local "T" (a nil value) and I cant figure out how to make it stay on your head

can someone please help?

Answer this question