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

The block isnt going into the posistion its needed in?

Heres the script:

local clickdetector = script.Parent
clickdetector.MouseClick:Connect(function(player) -- registers the click
    while true do -- from here its just to code
        game.Workspace.OHHH.Position = Vector3.new(-16.3, 0.5, -10.5)

        wait(3)
        game.Workspace.OHHH.Position = Vector3.new(-16.4, 0.5, -8.8)
        wait(3)
    end
end)

so basically this script is linked to a Click Detector and when I click it, the block goes above into the air and not in the ground like its supposed to, help!

4 comments

0

Does the position you are trying to set the part to also happen to force it to collide with another part?

0

yes

0

Set CanCollide = false while setting the position, and once the position is set, you can make it true again.

0

you do realize you could just use clickdetector.MouseClick:Wait()?

1 answer

✓ Accepted answer

Try replacing the Position with a CFrame

Exmple:

local clickdetector = script.Parent
clickdetector.MouseClick:Connect(function(player) 
    while true do
        game.Workspace.OHHH.CFrame = CFrame.new(-16.3, 0.5, -10.5)

        wait(3)
        game.Workspace.OHHH.CFrame= CFrame.new(-16.4, 0.5, -8.8)
        wait(3)
    end
end)

2 comments

0

thanks!

0

np

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