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

Can I get help?

Asked by 10 years ago

Hello, my name is cam and I'm working on a game called LOST. But the downside is that I'm not a really good scripter. So, I need help with this script.

TestBrick = script.Parent

function move() TestBrick.CFrame = TestBrick.CFrame + Vector3.new (0,0,1)

end

TestBrick.ClickDetector.MouseClick:connect(move)

function move() TestBrick.CFrame = TestBrick.CFrame + vector3.new

              wait (30) (168.483, -17.3, 218.738)

end

I need the brick to teleport to the coordinates 168.483, -17.3, 218.738, but it won't work. Thanks for the help :)

2 answers

Log in to vote
0
Answered by
Vividex 162
10 years ago

Please us a code block its easier to read, and for starters, capitalization is a big part of Lua "Vector3" And you don't need a Vector3.new, try this (Didn't test, if doesnt work leave comment of output also please)

TestBrick = script.Parent

function move(onButtonDown)
    wait(30)
    TestBrick.CFrame = CFrame.new(168.483, -17.3, 218.738)
end

TestBrick.MouseClick:connect(move) --P.S. Be sure to put a Click Detector in the part too.
Ad
Log in to vote
0
Answered by 10 years ago

Try this

I havent double checked it though.

TestBrick = script.Parent

function move() 
    TestBrick.CFrame = TestBrick.CFrame + Vector3.new (0,0,1)

end

TestBrick.ClickDetector.MouseClick:connect(move)

TestBrick = script.Parent

function move(onButtonDown) 
    wait(30)

TestBrick.CFrame = CFrame.new(168.483, -17.3, 218.738)
end

TestBrick.MouseClick:connect(move)

Good luck!

Best regards, Nathan

0
Nope, it still won't go to the coordinates. cam13469 0 — 10y

Answer this question