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

Why does this playback light script work in studio but not in actual game? [UNSOLVED]

local s = workspace:WaitForChild("Sound") while game:GetService("RunService").Heartbeat:Wait() do print(s.PlaybackLoudness) script.Parent.Transparency = 1-((1/150)*s.PlaybackLoudness) end

Keep in mind this works in studio but in the actual game it doesn't work. I feel like it has something to do with the fact I have filteringenabled

1 comment

0

Can someone teach me how to script at lua bc i need it for my games

2 answers

use game.Workspace

3 comments

0

that didnt work :\

0

Purely preference. Most will prefer workspace.

0

not true. game.Workspace gets both the service class Workspace. workspace is also vague and can be called as a different object.

Make sure this is a Local Script. Server scripts cannot utilize .Heartbeat.

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