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

Why does the block just sit in place and not change a thing?

Asked by 9 years ago

I cant runt he script in studio to see the error becuz it will crash studio :/

Script is supposed to assign a name to the string value and change text in places and then go down and disappear:

P.S. I DONT LOOP BECAUSE I DONT KNOW HOW TO GET IT TO WORK...I tried, lol

local bo = script.Parent.BecomeOwner
local val = script.Parent.Parent.Owner
local nam = script.Parent.Name
local pos = script.Parent.BecomeOwner.Position

function onTouch(plr)
    val.Value = plr.name
    nam = "Current Owner: " ..val.Value
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo = Vector3.new (0,-.3,0)
    wait(.1)
    bo:Destroy()
end

script.Parent.Touched:connect(onTouch)
0
Just realized that it is trying to put the thing in a spot over and over again :/ snoppyploptart 59 — 9y

1 answer

Log in to vote
0
Answered by
RoboFrog 400 Moderation Voter
9 years ago

To loop, all you would need to do is this:

for i = 1, 10 do -- 10 will be the amount of times it loops

bo = Vector3.new (0,-.3,0)
wait(.1)

end

As for the movement error, it seems like you already figured that out.

If not, you could do something like this--

local posit = 10 -- Whatever the starting X position is.

for i = 1,10 do

posit = posit - .3
bo = Vector3.new(0, posit, 0)
wait(.1)

end
0
I do that and the loop never wants to work lol but thanx snoppyploptart 59 — 9y
0
Try the second loop I just added if you haven't already. Your original script wasn't making it move by .3 each time, but just stating that's its position. If it still doesn't seem its working, a simple print will let you know for sure. RoboFrog 400 — 9y
Ad

Answer this question