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

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


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

1 comment

0

Any errors in the output?

2 answers

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

1 comment

0

I’m on iOS typing this but the code is written properly I just edited it on here still doesn’t work

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

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