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

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

Asked by 7 years ago
Edited 7 years ago

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

0
Can someone teach me how to script at lua bc i need it for my games RidiculousBox -6 — 6y

2 answers

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
7 years ago

use game.Workspace

0
that didnt work :\ andrew_du 0 — 7y
0
Purely preference. Most will prefer workspace. User#20476 0 — 7y
0
not true. game.Workspace gets both the service class Workspace. workspace is also vague and can be called as a different object. GingeyLol 338 — 6y
Ad
Log in to vote
0
Answered by 7 years ago

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

Answer this question