Since you’re firing a RemoteEvent from the server I’m assuming that you have a Script in ServerScriptService that handles what happens when the event is fired. Simply change that from the server to the client, and that should resolve the issue!
Since you’re only firing the RemoteEvent; it won’t do anything. In StarterPlayerScripts, you can add a LocalScript that detects when the event is fired, and what happens.
For example, here’s a showcase of what you can do:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent") -- // Change the name of this to the name of your remote event
local function onClientReceive()
-- // This prints out "Remote Event Fired!" once connected to the firing request.
print("Remote event fired!")
end
RemoteEvent.OnClientEvent:Connect(onClientReceive)
So I need to fire an event that sets off a nuke in the workspace, so would I just send out another event or what?
EDIT: By the way this is the nuke script:
wait(1)
script.Parent.Missle.Base.Anchored = true
debounce = false
game.ReplicatedStorage.NukeEvent.OnServerEvent:Connect(function()
if debounce == false then
debounce = true
local siren = script.Parent.Siren
siren.Parent = workspace
siren:Play()
coroutine.resume(coroutine.create(function()
local lights = script.Parent.Lights:GetChildren()
for i=1,100 do
for i,v in pairs(lights) do
v.SpotLight.Enabled = true
end
wait(1)
for i,v in pairs(lights) do
v.SpotLight.Enabled = false
end
wait(1)
end
end))
wait(2)
script.Parent.Missle.Base.Fire.Enabled = true
script.Parent.Missle.Base.Smoke.Enabled = true
wait(3)
script.Parent.Missle.PrimaryPart = script.Parent.Missle.Base
for i=1,320 do
script.Parent.Missle:SetPrimaryPartCFrame(script.Parent.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0.05*((1.1^(i/5))/3),0))
wait()
end
wait()
for i=1,100 do
script.Parent.Missle:SetPrimaryPartCFrame(script.Parent.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0.05*(1.1^((250-i)/5)/3),0))
script.Parent.Missle:SetPrimaryPartCFrame(script.Parent.Missle:GetPrimaryPartCFrame()*CFrame.Angles(0,math.pi/100,0))
script.Parent.Missle:SetPrimaryPartCFrame(script.Parent.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0,-i/100))
wait()
end
wait()
for i=200,120,-1 do
script.Parent.Missle:SetPrimaryPartCFrame(script.Parent.Missle:GetPrimaryPartCFrame()-Vector3.new(0,0.1*((1.1^(i/2.95))/4),0))
wait()
end
script.Parent.Missle.Tip.Transparency = 0.5
script.Parent.Missle.Tip.CanCollide = false
script.Parent.Missle.Tip.Mesh.Scale = Vector3.new(1,1,1)
local boom = script.Parent.Boom
boom.Parent = workspace
boom:Play()
local frame = script.Parent.Missle.Tip.CFrame
script.Parent.Missle.Tip.Boom.Disabled = false
for i=1,400 do
script.Parent.Missle.Tip.Size=script.Parent.Missle.Tip.Size+Vector3.new(3,3,3)
script.Parent.Missle.Tip.CFrame=frame
wait()
end
script.Parent.Missle.Tip.Boom.Disabled=true
script.Parent.Missle:Destroy()
siren:Stop()
boom:Stop()
end
end)
In that case, from your Script in the workspace, you can use the :FireAllClients() event. This will replicate your Nuke script to every connected client.
Additionally, you’ll need to switch the .OnServerEvent() script (the one you linked above) to a .OnClientEvent() in StarterPlayerScripts instead, like what I showed earlier in this thread
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.NukeEvent -- // Change the name of this to the name of your remote event
local function onClientReceive()
print("Nuke Event")
end
RemoteEvent.OnClientEvent:Connect(onClientReceive)
Nothing is printing anymore, the nuke isn’t working and I don’t think the script is working either.
This is the code inside of the LocalScript.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.NukeEvent -- // Change the name of this to the name of your remote event
local function onClientReceive()
wait(1)
warn("The nuke has been launched!")
game.Workspace.Nuke.Missle.Base.Anchored = true
local debounce = false
if debounce == false then
debounce = true
local siren = game.Workspace.Nuke.Siren
siren.Parent = workspace
siren:Play()
coroutine.resume(coroutine.create(function()
local lights = game.Workspace.Nuke.Lights:GetChildren()
for i=1,100 do
for i,v in pairs(lights) do
v.SpotLight.Enabled = true
end
wait(1)
for i,v in pairs(lights) do
v.SpotLight.Enabled = false
end
wait(1)
end
end))
wait(2)
game.Workspace.Nuke.Missle.Base.Fire.Enabled = true
game.Workspace.Nuke.Missle.Base.Smoke.Enabled = true
wait(3)
game.Workspace.Nuke.Missle.PrimaryPart = game.Workspace.Nuke.Missle.Base
for i=1,320 do
game.Workspace.Nuke.Missle:SetPrimaryPartCFrame(game.Workspace.Nuke.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0.05*((1.1^(i/5))/3),0))
wait()
end
wait()
for i=1,100 do
game.Workspace.Nuke.Missle:SetPrimaryPartCFrame(game.Workspace.Nuke.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0.05*(1.1^((250-i)/5)/3),0))
game.Workspace.Nuke.Missle:SetPrimaryPartCFrame(game.Workspace.Nuke.Missle:GetPrimaryPartCFrame()*CFrame.Angles(0,math.pi/100,0))
game.Workspace.Nuke.Missle:SetPrimaryPartCFrame(game.Workspace.Nuke.Missle:GetPrimaryPartCFrame()+Vector3.new(0,0,-i/100))
wait()
end
wait()
for i=200,120,-1 do
game.Workspace.Nuke.Missle:SetPrimaryPartCFrame(game.Workspace.Nuke.Missle:GetPrimaryPartCFrame()-Vector3.new(0,0.1*((1.1^(i/2.95))/4),0))
wait()
end
game.Workspace.Nuke.Missle.Tip.Transparency = 0.5
game.Workspace.Nuke.Missle.Tip.CanCollide = false
game.Workspace.Nuke.Missle.Tip.Mesh.Scale = Vector3.new(1,1,1)
local boom = game.Workspace.Nuke.Boom
boom.Parent = workspace
boom:Play()
local frame = game.Workspace.Nuke.Missle.Tip.CFrame
game.Workspace.Nuke.Missle.Tip.Boom.Disabled = false
for i=1,400 do
game.Workspace.Nuke.Missle.Tip.Size=game.Workspace.Nuke.Missle.Tip.Size+Vector3.new(3,3,3)
game.Workspace.Nuke.Missle.Tip.CFrame=frame
wait()
end
game.Workspace.Nuke.Missle.Tip.Boom.Disabled=true
game.Workspace.Nuke.Missle:Destroy()
siren:Stop()
boom:Stop()
end
end)
end
RemoteEvent.OnClientEvent:Connect(onClientReceive)
Hello, I do not think you should bump your help and feedback this frequently, typically people will come around at some point, that is not a rule, it is just a note.
But lets see where Schedency left you off.
To confirm.
You have:
A local script that doesn’t work when the server calls it
A server script that fires all clients to work the nuke
And to confirm:
Your NukeEvent is still in ReplicatedStorage not in any file, folder or other.
There are no errors
You are firing all clients and have tested that you fire all clients