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

part doesn't move or print?

Asked by 3 years ago

everything is in the tool

local Vector = script.Parent.Parent.Value.Value

if script.Parent.Parent.Value2.Value == true then
    while true do
        wait()
        print("hi")
        script.Part.Position = script.Part.Position + Vector3.new(Vector.X, Vector.Y, Vector.Z)
        print("hi")
        if script.Parent.Value2.Value == false or wait(5) then
            script.Parent.Parent.Value2.Value = false
            script.Part.Transparency = 1
            break
        end
    end
end
0
You're trying to move a part from a local script. This technically should be handled on the server unless you are wanting to only move it for the client to see. gunter5 17 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

If you use the wait function as an condition it will be considered true and as you have an or parameter in line 9 it will only execute your code once, wait 5 seconds and then break your while in line 12

Ad

Answer this question