Output is saying that im attempting to call a nil value

local steve = script.Parent.CFrame

script.Parent.Touched:connect(function(adam)

script.Parent.CFrame = steve

script.Parent.BrickColor = BrickColor.Random()

script.Parent.Size = Vector3.new(math.random(.1,3),math.random(.1,3),math.Random(.1,3))

end)

Connect not connect

nevermind

what is adam for


doesn’t matter and I tried still prints nil value

local steve = script.Parent.CFrame

script.Parent.Touched:Connect(function(adam)
    script.Parent.CFrame = steve
    script.Parent.BrickColor = BrickColor.Random()
    script.Parent.Size = Vector3.new(math.random(1,3),math.random(1,3),math.random(1,3))
end)

@p49p0 connect would still work, just that its deprecated

Also you can’t use math.random using decimals

This should be math.random.

1 Like

thank you i sometimes forget how important formatting is

i didn’t know it is a deprecated function, sorry :flushed:

my dad’s name lol i was trying to teach something

wait if connect is deprecated how would I use a function? also i apologize for newbiness i am coming back to developing after a while off

Just capitalize the C in connect, nothing too complicated

oh lol thank you i was a bit worried

1 Like