Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Executing Function for second time doesn't work?

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

4 comments

0

Just wondering.. If you used output did output say anything? Or was it quite :3

0

Output didn't say something related to this

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

0

if i have to modify the seconds i will need to modify it only on 1 line instead of 9

1 answer

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()

This discussion is preserved as it was. New answers, comments, and votes are closed.