blox6137Join Date: 2008-11-23 Post Count: 1109 |
local part = script.Parent
pPos = part.Position
while wait(.5) do
pPos = Vector3.new(pPos) + 0,1,0
end
-- it says expected vector3, got number |
|
|
pPos = Vector3.new(pPos) + Vector3.new(0,1,0) |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Trying to make a part move upwards? |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Yeah. |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
It still isn't working. :/
~~~~~
local part = script.Parent
pPos = part.Position
while wait(.5) do
pPos = Vector3.new(pPos) + Vector3.new(0,1,0)
end
~~~~~
I have other scripts working on the same part, so not sure if that affects anything. |
|
|
Try using,
pPos = pPos + Vector3.new(0,1,0)
Inform us of the result. |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Lol didn't give up on you. Testing some scripts right now |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Same result.
Could pPos be the problem? |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
@Anony I already tried that |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
http://www.roblox.com/test-item?id=167871597
I accidentally posted this on my alt, but here it is. |
|
|
Hmm, try using this,
local part = script.Parent
pPos = part
while wait(.5) do
pPos.Position = pPos.Position + Vector3.new(0,1,0)
end |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Sorry, you guys probably don't know what that link is.
I thought I created a post earlier about making a model. Guess I didn't. :/
~ALL THAT MODEL IS IS A SPAWN POINT~
I don't get why I'm having such a hard time with it. |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Doesn't that completely revoke the meaning of pPos?
I could just use 'part', couldn't I? |
|
|
Assign pPos in the while loop |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Well it worked, so thank you!
Now I'm just going to mess around with that script a bit to make it work as I initially intended it to.
Thanks again. |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
D: I was late.
pPos = script.Parent
while wait(.5) do
for i = pPos.Position.y, pPos.Position.y + 5, .5 do
x = pPos.Position.x
z = pPos.Position.z
pPos.CFrame = CFrame.new(x, i, z)
wait()
end
end
That could be simpler but eh |
|
|
local part = script.Parent
while wait(.5) do
pPos = part.Position
pPos = pPos + Vector3.new(0,1,0)
end |
|
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Okay, so I got what I initially wanted, but how would I make it come back down?
~~~~~
local part = script.Parent
pPos = part
while wait(.1) do
if pPos.Position == Vector3.new(67, 7, -150) then
pPos.Position = pPos.Position + Vector3.new(0,1,0)
wait()
elseif pPos.Position == Vector3.new(67, 9, -150) then
pPos.Position = pPos.Position - Vector3.new(0,1,0)
wait()
end
end
~~~~~
it just moves it up, and then stops running. |
|
|
pPos = pPos - Vector3.new(0, HOW MUCH STUDS YOU WANT IT TO GET DOWN, 0) |
|
|
|
The elseif only fires once |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Okay, I have a script, but how would I make it less glitchy?
local part = script.Parent
pPos = part
while wait(1) do
pPos.Position = pPos.Position + Vector3.new(0, 1, 0)
wait(1)
pPos.Position = pPos.Position - Vector3.new(0, 1, 0)
end |
|
|
Nevermind I'm maybe drunk or something just forget me |
|
MTamidexJoin Date: 2013-10-17 Post Count: 1092 |
why don't you use for i=STARTINGNUMBER, ENDINGNUMBER do?
Like
for i = 1, 5 do
pPos = Vector3.new(0, i , 0)
end
i don't know if this works though |
|