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

What is wrong with this script? The objective is to make a wave effect of the sand.

while true do
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.9, 999.9)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.8, 999.8)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.7, 999.7)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.6, 999.6)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.5, 999.5)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.4, 999.4)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.3, 999.3)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.2, 999.2)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.1, 999.1)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999, 999)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.1, 999.1)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.2, 999.2)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.3, 999.3)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.4, 999.4)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.5, 999.5)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.5, 999.6)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.7, 999.7)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.8, 999.8)
	wait(1)
	script.Parent.Size = Vector3(3.75, 999.9, 999.9)
	wait(1)
	script.Parent.Size = Vector3(3.75, 1000, 1000)
end

2 comments

0

You forgot to use .new change Vector3 to Vector3.new

0

This is a lot of code duplication I would look at using a table

1 answer

first of all, stop writing too much, use a variable to make it a little easier:

var part = script.Parent;

while true do
    wait(1)
    part.Size = Vector3(3.75, 999.9, 999.9)
    wait(1)
   part.Size = Vector3(3.75, 999.8, 999.8)
end

and you forgot .new after vector3. Do this

var part = script.Parent;

while true do
    wait(1)
    part.Size = Vector3.new(3.75, 999.9, 999.9)
    wait(1)
   part.Size = Vector3.new(3.75, 999.8, 999.8)
end

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