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

How to make my script do all I coded? (Answered )

My script wont do all of what I coded it to do, but I see no errors. Please help? I'd like an explanation why it wont work too, please.



script.Parent.Touched:connect(function()
	script.Parent.Transparency = 0.3
	script.Parent.BrickColor = BrickColor.Random()
	wait(1)
	script.Parent.Size = Vector3.new("1, 1, 1")
	if script.Parent.Size == ("1, 1, 1") then
		wait(1)		
		script.Parent.Size = Vector3.new("2, 2, 2")
	end
end)


1 answer

✓ Accepted answer

Vector3.new() takes 3 numbers as arguments, not 1 string:

script.Parent.Touched:connect(function()
    script.Parent.Transparency = 0.3
    script.Parent.BrickColor = BrickColor.Random()
    wait(1)
    script.Parent.Size = Vector3.new(1, 1, 1)
    if script.Parent.Size == Vector3.new(1, 1, 1) then
        wait(1)
        script.Parent.Size = Vector3.new(2, 2, 2)
    end
end)

I didn't see your first question, but please use the Edit feature rather than repost in the future.

1 comment

0

Oh yea! I completely forgot! Sorry that was dumb of me, I didn't noticed I made the numbers a string.

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