1
This commit is contained in:
1 parent
38e4e1c302
commit
82eecfda06
2 files changed
+3
No files matched your search
BIN
Binary file not shown.
@@ -5,6 +5,8 @@ local Sounds = require(ReplicatedStorage:WaitForChild("SniperEffects") :: Module
|
|||||||
|
|
||||||
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
|
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
|
||||||
local hoverDef = Sounds.SOUNDS.ButtonHover
|
local hoverDef = Sounds.SOUNDS.ButtonHover
|
||||||
|
-- The supplied recording has about 0.38 seconds of silence before the cue.
|
||||||
|
local HOVER_START_SECONDS = .38
|
||||||
local hover = Instance.new("Sound")
|
local hover = Instance.new("Sound")
|
||||||
hover.Name = "SniperButtonHover"
|
hover.Name = "SniperButtonHover"
|
||||||
hover.SoundId = hoverDef.id
|
hover.SoundId = hoverDef.id
|
||||||
@@ -19,6 +21,7 @@ local function playHover()
|
|||||||
if volume <= 0 then return end
|
if volume <= 0 then return end
|
||||||
hover:Stop()
|
hover:Stop()
|
||||||
hover.Volume = volume
|
hover.Volume = volume
|
||||||
|
hover.TimePosition = HOVER_START_SECONDS
|
||||||
hover:Play()
|
hover:Play()
|
||||||
end
|
end
|
||||||
local bound: {[GuiButton]: boolean} = setmetatable({}, {__mode = "k"})
|
local bound: {[GuiButton]: boolean} = setmetatable({}, {__mode = "k"})
|
||||||
|
|||||||
Reference in new issue
Block a user