No, the Script I provided is fine but you surely have a way to damage other Players right?
Oh, I put in startergear a classicsword from roblox.
Would you be able to provide the sword as a file?
I don’t know how put file but there its the link of the model https://www.roblox.com/library/47433/Sword
After some rooting around, I found on line 112 inside the SwordScript that it damages the other Player.
Here on line 113, 114, 115 and 116 make sure to have this code:
if (humanoid.Health == 0) then
game:GetService("ReplicatedStorage").DisplayKill:FireClient(Player)
end
end
Uppercase Player
is the Tool’s Owner so therefore it’ll be fired to the attacker.
I did, but still don’t work and the thing still tell me PlayerToDamage and PlayerWhoAttacked is unknow global
That other Script was an example and isn’t needed anymore, you can get rid of it.
Can you explain how it doesn’t work now, any errors in the output?
So the Gui don’t appear when I kill the other player and in ouput there is nothing, I have no error or something else. Is like nothing happen.
Could you try print debugging by adding print()
to areas in the code? Then it can give me an idea of where it isn’t reaching.
In the sword script or in the localscript of the Gui frame ?
Both, but inside the SwordScript only add it to where it damages (near line 112).
I killed the player two time, first time was write debugging x22 and the 2nd time was write debugging x49
So is the Connected OnClientEvent function running?
I think, I really don’t know how it work. Maybe you want I add you on my robloxstudio to see ?
Provide a placefile and I’ll take a peek, you can create one by going to File → Save to File As.
I would use an RemoteFunction to kill the an enemy then send the information back to the player that killed the enemy.
After some debugging I found out that their Health could go below 0, to reflect this I’ve edited the if statement to check if their Health is 0 or below. It now functions like it should, you can take it here:
BaseplateKillGuiTest.rbxl (27.2 KB)
Thank you so much dude for all help you made for me