Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make this script kill a player?

Asked by 5 years ago
    local Plr = game:GetService("Players").LocalPlayer

local Mouse = Plr:GetMouse()



Mouse.Button1Down:connect(function()

if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.T) then return end

if not Mouse.Target then return end

Mouse.Target.Parent.Humanoid.Health = 0

end)

this is a local script in the starterpack so it obviously only shows for the player that did it that the other one is dead, but the other person isnt actually dead, help please

1 answer

Log in to vote
1
Answered by 5 years ago

Try looking at this https://developer.roblox.com/articles/Remote-Functions-and-Events

This may solve your problem

Ad

Answer this question