so this runs it
wait(0.8)
print("Death event fired")
DeathEvent:Fire()
and this is supposed to be ran
local DeathEvent = game.Workspace.BindableEvents:WaitForChild("DeathEvent")
DeathEvent.Event:Connect(function()
print("DeathEvent Ran")
local SIREN = game.Workspace.SirenHeadBot
SIREN.SirenHeadAI.Disabled = true
SIREN.Animate.Disabled = true
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
local Part = Char:WaitForChild("HumanoidRootPart")
local Weld = Instance.new("Weld", Char)
Weld.Name = "Something"
Part.Position = Vector3.new(game.Workspace.Knife.Position)
script.Parent.Knife.CFrame = Part.CFrame
Weld.Part0 = game.Workspace.Knife
Weld.Part1 = Part
Weld.C0 = Part.CFrame:inverse()
Weld.C1 = game.Workspace.Knife.CFrame:inverse()
end)
end)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:wait()
local Weld = plr.Character:FindFirstChild("Something")
plr.Character.Humanoid.Died:Connect(function()
print("ded")
SIREN.SirenHeadAI.Disabled = false
SIREN.Animate.Disabled = false
Weld:Destroy()
end)
end)
end)
Now everything is printing, but
A: I want to make it so the code that get executed only happens to a player that fired the event
B: the script that it executes dosent work despite no error in output. Please help!

1 comment
use RemoteEvent