Hello everyone, so i am trying to make a c4 like note7, without using remote events, (using bridgenet) But the problem, is that it works for one player and not for the other players.
Client:
local replicated = game:GetService("ReplicatedStorage")
local collection = game:GetService("CollectionService")
local bridgeNet = require(replicated.SPH_Assets.Modules.BridgeNet)
local repC4 = bridgeNet.CreateBridge("C4ReplicationStuff")
collection:GetInstanceAddedSignal("Note7"):Connect(function(note7:Tool)
local handle = note7:WaitForChild("Handle")
local cooldown = false
local updtick = 2
local function Tick()
updtick = updtick * 0.9
end
local function Boom(Pos)
local exp = Instance.new("Explosion")
exp.Position = Pos
exp.BlastRadius = 20
exp.BlastPressure = 2500000
exp.Parent = workspace
local expsound = Instance.new("Sound")
expsound.SoundId = "rbxassetid://12222084"
expsound.Volume = 1
expsound.Parent = workspace
expsound:Play()
end
local function TickSound(handleclone)
while updtick > 0.05 do
task.wait(updtick)
Tick()
handleclone.Click:Play()
end
Boom(handleclone.Position)
cooldown = false
updtick = 2
Handle.Transparency = 0
end
local function ToolActivated(Handle)
if not cooldown then
repC4:Fire(Handle)
cooldown = true
Handle.Plant:Play()
local handleclone = Handle:Clone()
Handle.Transparency = 1
handleclone.CanCollide = true
handleclone.Parent = workspace
Handle.Plant.Ended:Wait()
handleclone.Click:Play()
TickSound(handleclone)
end
end
repC4:Connect(function(Handle)
ToolActivated(Handle)
end)
note7.Activated:Connect(function()
ToolActivated(handle)
end)
end)
Server:
local replicated = game:GetService("ReplicatedStorage")
local bridgeNet = require(replicated.SPH_Assets.Modules.BridgeNet)
local repC4 = bridgeNet.CreateBridge("C4ReplicationStuff")
repC4:Connect(function(plr, handle)
repC4:FireAllInRangeExcept(plr, handle.Position, 125)
end)
Video showcasing:
How would i resolve this error/problem, have been trying for a week now, any suggestions are helpful.