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

Executing Function for second time doesn't work?

Asked by 9 years ago

This script works but when it does once again it doesn't in the same Roblox studio play session.

For example the Scale of the mesh normally is (5,7,5) then when its back to (5,7,5) it doesn't work anymore...

I've tried adding if-repeat-then and many more and doesn't work (maybe) in the way i did.

local Ice = script.Parent
local t = 2

wait(t)
Ice.Mesh.Scale = Vector3.new(4.5,6.5,4.5)
wait(t)
Ice.Mesh.Scale = Vector3.new(4,6,4)
wait(t)
Ice.Mesh.Scale = Vector3.new(3.5,5.5,3.5)
wait(t)
Ice.Mesh.Scale = Vector3.new(3,5,3)
wait(t)
Ice.Mesh.Scale = Vector3.new(2.5,4.5,2.5)
wait(t)
Ice.Mesh.Scale = Vector3.new(2,4,2)
wait(t)
Ice.Mesh.Scale = Vector3.new(1.5,2.5,1.5)
wait(t)
Ice.Mesh.Scale = Vector3.new(1,2,1)
wait(t)
Ice.Mesh.Scale = Vector3.new(0.6,1.2,0.6)
Ice.CanCollide = false
0
Just wondering.. If you used output did output say anything? Or was it quite :3 iSvenDerp 233 — 9y
0
Output didn't say something related to this brikgame191 10 — 9y
0
Hmmm that's what happened with my script yesterday I can't seem to find the problem is there a reason you put a variable for your wait? Just out off curiosity iSvenDerp 233 — 9y
0
if i have to modify the seconds i will need to modify it only on 1 line instead of 9 brikgame191 10 — 9y

1 answer

Log in to vote
0
Answered by
Codebot 85
9 years ago

Oh boy I know this isnt an answer, but I just cant stand seeing this

Ice = script.Parent
function MoveIce()
for i = 1,9 do -- change the 9 to whatever (how far it goes)
wait(2)
Ice.Mesh.Scale.CFrame = Ice.Mesh.Scale.CFrame - Vector3new(.5, .5, .5)
end
Ice.CanCollide = false
end

MoveIce()
Ad

Answer this question