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

If and Then statements aren't working?

Asked by 5 years ago

function MaterialI(Material1)

return Material1

end

x = MaterialI("Grass")

function MaterialII(Material2)

return Material2

end

y = MaterialII("Neon")

function MaterialIII(Material3)

return Material3

end

z = MaterialIII("Glass")

script.Parent.Material = x

wait(2)

script.Parent.Material = y

wait(2)

if script.Parent.Material == y then

script.Parent.Rotation = Vector3.new(30,20,50)

end

wait(2)

script.Parent.Material = z

If and Then statements isn't working, the part doesn't rotate :/ Did I type something wrong? The output said nothing:/

0
The function return works perfectly btw :) Love RETURN Creeperdo123 -17 — 5y
0
Not sure if you're aware of this, but Material is an Enum and not a string. It will always take an Enum. DeceptiveCaster 3761 — 5y

Answer this question