Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

server script is not changing part properties at all?

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

2 comments

1

do u wait in game that long lmao

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.

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.