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

Why does the +vector3.new/-Vector3.new not work?

local enabled = true
Player = script.Parent.Parent
character = Player.CharacterAdded:wait();
mouse = Player:GetMouse()
Run = game:GetService("RunService")
Head = Player.Character.Head 
function onKeyDown(key)
	key = key:lower()
	if key == "r" then
		game:GetService("Chat"):Chat(Player.Character.Head, "REN!")
		r = Instance.new("Part")
		r.Shape = "Ball"
		r.Transparency = 0.7
		r.BrickColor = BrickColor.new("White")
		r.TopSurface = "Smooth"
		r.BottomSurface = "Smooth"
		r.CanCollide = false
		for i = 1,20 do
		r.Size = Vector3.new(r.Size.X + 1, r.Size.Y + 1, r.Size.Z + 1)
		wait()
	end
	    for i = 1,20 do
		r.Size = Vector3.new(r.Size.X - 1, r.Size.Y - 1, r.Size.Z - 1)
	end
		r.Parent = workspace
		Weld = Instance.new("Weld")
		Weld.Part0 = r
		--Weld.C0 = r.CFrame:inverse
		Weld.Part1 = Head
		Weld.Parent = character 
	end
end

mouse.KeyDown:connect(onKeyDown)

Thanks for helping me.

5 comments

0

Is there an error?

0

No.

0

Actually yes,Head is not a valid member of Model

0

its not that - and + dosen't work, it's the fact that's head isn't part of the model

1

I gave this guy this method and he downvoted it! WTF?!

1 answer

✓ Accepted answer

Try:

 char = Workspace:findFirstChild(Player.Name)
Head= char:findFirstChild("Head")

1 comment

0

It would probably be better to use WaitForChild() because we know the head will exist eventually, but the FindFirstChild will return nil if it doesn't exist at that particular time.

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