I'm making this script that has to change the value depending on what random number it lands on.
It has been working without the value part, but I'm not sure how to fix it
It also has an error saying:
EnumItem cannot be modified
This is the script:
local part = math.random(1,100) local val = script.Parent.Material print(part) if part < 41 then print("grass") val.Value = "grass" script.Parent.BrickColor = BrickColor.Green() elseif part > 40 and part < 61 then print("road") val.Value = "road" script.Parent.BrickColor = BrickColor.Black() elseif part > 60 and part < 101 then print("water") val.Value = "water" script.Parent.BrickColor = BrickColor.new("Bright bluish green") end
Locked by Spongocardo, chess123mate, and M39a9am3R
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?