Bindable event not firing?
Hi, I have a bindable event that fires whenever a player has killed someone with a knife, this script works as its should but I am having some problems with firing the bindable event.
Also, basically this bindable event is just transferring two players names from one script to another.
--Knife script
1 | kill = hit.Parent.Humanoid.Died:connect( function () |
2 | print ( "Player has died" ) |
3 | game:GetService( "ServerStorage" ).KilledPlr:Fire(script.Parent.Parent.Parent.Name,hit.Parent.Name) |
And yes, it prints "Player has died" but it does not fire the bindable event.
Here is the other server script recieving the bindable event.
1 | local bindable = game:GetService( "ServerStorage" ).KilledPlr |
3 | bindable.Event:Connect( function (plrname,plrkilled) |
5 | game:GetService( "ServerStorage" ).DiedScreen.Main.KilledBy.Text = "You have been killed by " ..plrname.. "!" |
6 | game:GetService( "ServerStorage" ).DiedScreen:Clone().Parent = game:GetService( "Players" ) [ plrkilled ] .PlayerGui |
8 | game:GetService( "Players" ) [ plrkilled ] .PlayerGui.DiedScreen:Destroy() |
Basically the "Event" function doesnt run. This is really frustrating and I hope someone can help.
Additional info: Bindable event is stored in serverstorage.
Thanks!