I learning lua and using the wiki but I don't get why this script wont work:
--Enum values:Plastic 0 Wood 1 Slate 2 Concrete 3 CorrodedMetal 4 DiamondPlate 5 Foil 6 Grass 7 Ice 8
local p2=Instance.new("Part",Workspace)
p2.Name="p2"
p2.Shape="Ball"
p2.Size=Vector3.new(5,5,5)
p2.Material=3 <--- wont work
p2.BrickColor=BrickColor.Red()
function ontouch()
p2.BrickColor=BrickColor.Random()
wait(8)
p2:Destroy()
end
p2.Touched:connect(ontouch)
|