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

How do I make a seal model I make move?

Asked by 4 years ago
Edited 4 years ago

It really doesn’t move, here’s the script: (also there was no bug in output)

model = game.Workspace.group start = model.A end = model.B position = model.object

while true position.Position = end.Position wait (2) position.Position = start.Position wait (2) end

0
Please format your code. youtubemasterWOW 2741 — 4y
0
wdym? sealzrcool 6 — 4y
0
Press the lua button. youtubemasterWOW 2741 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Hello there.

Issues:

The issue is that you named a variable "end", which would not work since "end" is a global keyword. Instead, use "endPosition".

Recommendations:

Use local before a variable since variables without "local" are less efficient.

Fixed Code:

local model = workspace.group 
local startPosition = model.A 
local endPosition = model.B
local position = model.object

while true do
    position.Position = endPosition.Position 
    wait(2) 
    position.Position = startPosition.Position 
    wait(2) 
end
0
lemme see if it works on studio k sealzrcool 6 — 4y
Ad

Answer this question