Hi there. I've been struggling with this for a while now since I'm not a programmer or anything like that, I just know basic things around scripting.
I'm trying to make a walkie-talkie tool that essentially works like this:
- the player chats while the tool is equipped
- a sound in the tool plays for the server, not just for the local player
- if the tool is unequipped, this won't happen
Tool looks like this
The playerChats script looks like this:
local Players = game:GetService("Players")
local Player = game.Players.LocalPlayer
local tool = script.Parent.Parent
tool.Equipped:Connect(function()
Player.Chatted:Connect(function()
script.Parent.Chatted:FireServer()
end)
end)
The playSound script looks like this:
script.Parent.Chatted.OnServerEvent:Connect(function()
script.Parent.Sound:Play()
end)
Thank you for your help <3

2 comments
NOTE: There is nothing in the output that shows me anything I'm doing wrong, it just doesn't play. I've tried all different kinds of sounds / volumes, no dice.
Did you parent the sound to the tool and not the handle? I've had problems with it too, though.