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

Rotation every time, play sounds?

Asked by 5 years ago

Audio Plays every each rotation by 5 degree+

This script will play a sound when the Engine in Workspace is detected to play sounds, The sounds should only be played every time when the part rotate 5 degree each time. However, it plays at 5 Degress and 0 only.

What effective way am i forgetting?

isAEngine = game.Workspace.Engine 
while wait() do
if isAEngine.Orientation.X >5 then
script.Parent.pitch_trim:Play()
end
if isAEngine.Orientation.X <5 then
script.Parent.pitch_trim:Play()
end
end
0
I'm pretty sure you can use GetPropertyChangedSignal("Orientation") which will fire every time the orientation changes. DeceptiveCaster 3761 — 5y
0
Not really very reliable, This is not a gui, its a Workspace function only. S0NIC_Dev 61 — 5y

Answer this question