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

Model isnt moving up when script is activated?

There is an error on line 10 telling me I cant double vector3??

local part = script.Parent

local function onPartTouched(otherPart)
	local partParent = otherPart.Parent
	local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		game.Workspace.tricky.Playing = true
		wait(9.1)
		game.Workspace.tricky.Playing = false
		game.Workspace.Clown:MoveTo(-159.244, 1.809, -30.002)
		humanoid.Health = 0
		wait(4)
		game.Workspace.Clown:MoveTo(-159.244, -4.801, -30.002)
	end
end

part.Touched:Connect(onPartTouched)

Im trying to move Model Clown up so it "kills" the player

1 answer

✓ Accepted answer

Hello!

There is a difference between tuples and Vector3s.

This is a tuple:

local a,b,c = -159.244, 1.809, -30.002 

and this is a Vector3:

local v3 = Vector3.new(-159.244, 1.809, -30.002)

Therefore, we can conclude that: tuple =/= Vector3

Vector3s are used to measure size and position. Tuples can be used as vector3s, but most commonly, they are not used to measure size and position.

To fix your script, put your coordinates inside Vector3.new(), like this:

game.Workspace.Clown:MoveTo(Vector3.new(-159.244, 1.809, -30.002))

If you have any questions, you can ask them in the comment section below.

1 comment

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