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

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

Asked by 10 years ago

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

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

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.

0
Oh yea! I completely forgot! Sorry that was dumb of me, I didn't noticed I made the numbers a string. alphawolvess 1784 — 10y
Ad

Answer this question