Hi, so I'm trying to make a sound play when a button is pressed, using a RemoteFunction to make it compatible with filtering. While this script does work, the "TextButton" does not and the sound starts playing as soon as I join the server.
The path to the TextButton is "script.Parent.On"
-- LocalScript
```lua local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ignitionRequest = ReplicatedStorage:WaitForChild("Ignition")
local ignition = ignitionRequest:InvokeServer()
print("Ignition Started") ``` -- Server
```lua local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ignitionRequest = Instance.new("RemoteFunction")
ignitionRequest.Parent = ReplicatedStorage
ignitionRequest.Name = "Ignition"
local function onIgnitionRequested(player)
print("Ignition wants to start")
script.Parent.Parent.Parent.Parent.Parent.Parent.ONE.A.ON:Play()
script.Parent.Parent.Parent.Parent.Parent.Parent.TWO.A.ON:Play()
script.Parent.Confirm.BackgroundColor3 = Color3.new(0, 255, 0)
end
ignitionRequest.OnServerInvoke = onIgnitionRequested() ```
Thanks.