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

How would I get the Player from here?

Asked by
soutpansa 120
6 years ago

I've got a skill that makes a player "suck blood" if they are a Vampire. They player presses a button, and it fires an event that clones a script into the player's right hand, and if their right hand touches an object with Humanoid in it, it subtracts 50 HP from that player, and adds +50 blood points to their blood meter.

The only problem is, how would I get the Player's stats from this script:

(it's located in their right arm)

function Suck(Part)
if Part.Parent:FindFirstChild("Humanoid") ~= nil then
Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health - 50
-- this is where I need to add the points to the player
end
end

(Sorry for it not being indented, it seems that I didn't save my progress so I lost the script, and had to type it out here)

1 answer

Log in to vote
0
Answered by
soutpansa 120
6 years ago

nvm I figured it out

Ad

Answer this question