- What do you want to achieve? Keep it simple and clear!
I have 2 RemoteEvent variables in a LocalScript that is parented to a Tool. I made it so the fire and reload sounds are handled by the server, that way others can hear them too.
- What is the issue? Include screenshots / videos if possible!
Output: Fire is not a valid member of Script “ReplicatedStorage.GunFE”
This is really weird because on the testing game the guns work fine but when I put them to a game with mroe scripts this issue starts happening.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Not much to be honest, I could just make the sounds play without a remoteevent but then other players wouldn’t hear the reloading/firing sound.
Sound Handler script (Server):
local FE2 = game.ReplicatedStorage.GunFE.Fire
local FE3 = game.ReplicatedStorage.GunFE.Reload
FE3.OnServerEvent:Connect(function(player, reloadsound)
reloadsound:Play()
end)
FE2.OnServerEvent:Connect(function(player, firesound)
firesound:Play()
end)```
Second script(Client):
```lua
local fireevent = TOOL:WaitForChild("FireEvent")
local firesoundevent = game.ReplicatedStorage.GunFE.Fire
local reloadsoundevent = game.ReplicatedStorage.GunFE.Reload
I even tried doing this:
local repstorage = game:GetService("ReplicatedStorage")
local folder = repstorage:WaitForChild("GunFE")
local firesoundevent = folder:WaitForChild("Fire")
local reloadsoundevent = folder:WaitForChild("Fire")```
And I'm still getting the same error