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

Current code is not changing a blocks position when stepped on by the player?

Asked by
M9F 94
4 years ago
Edited 4 years ago

local debounce = false local part = script.Parent local function onPartTouched(LeftFoot) if debounce == false then debounce = true game.Workspace.Part2.Position = Vector3.new(-45.6, 3.9, 3.2) wait(5) debounce = false end end part.Touched:Connect(onPartTouched)

So the Left foot of a player Touches a block named part in my work space, which in turn is supposed to teleport Part2 to a new position but it doesn’t... I’m unsure to as why because the function does run print

0
Any errors in the output? Soban06 410 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Capitalize the V in Vector, also close the parentheses at the connector on line 14.

0
I’m on iOS typing this but the code is written properly I just edited it on here still doesn’t work M9F 94 — 4y
Ad
Log in to vote
0
Answered by
M9F 94
4 years ago

The code works the problem was a simple weld that was automatically applied.

Answer this question