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

server script is not changing part properties at all?

Asked by 2 years ago

i am trying to make a beacon light but i don't even get any messag4es in output

---repeat forever
wait(10)
while true do

    ---turn light off
    wait(math.random(2, 100))
    script.Parent.Material = Enum.Material.Glass
    script.Parent.Transparency = 0.5
    script.Parent.PointLight.Enabled = false
    print("oceon -> valcano pipe light off")

    ---turn light on
    wait(math.random(2,100))
    script.Parent.Material = Enum.Material.Neon
    script.Parent.Transparency = 0
    script.Parent.PointLight.Enabled = true
    print("oceon -> valcano pipe light on")
end

script is parented by part so is the point light

1
do u wait in game that long lmao greatneil80 2647 — 2y
0
If I were you, I would use task.wait() instead of wait (because better) and don't put the range as high as 100 seconds if you are trying to debug. Change it to a shorter time and see if it functions as intended. lolmanurfunny 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Hello! I see you're trying to make the part change appereance. But as I see it, you putted the script in "Server Script Service" which wont affect the part at all. I tried the script and it works perfectly! The only you have to do is putting the script into the part then it will work 100%. The only thing that didnt work is the Point Light which i didn't add in my studio. Hope this helped if im wrong your welcome to respond or correct me.

Ad

Answer this question