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

How would i check if a player's character has gotten in contact with an explosion?

Asked by 1 year ago

Hello, i would like to know how i would check if a player or player's character got in contact with an explosion, because i'm currently trying to implement a gibbing system in my game.

1 answer

Log in to vote
1
Answered by
imKirda 4491 Moderation Voter Community Moderator
1 year ago
Edited 1 year ago
explosion.Hit:Connect(function(part, distance)
    print("helo, my name is", part.Name, "i have been hit by explosion, very bad, the distance from me and the epicenter of the explosion was", distance, "studs, very bad")

    if part.Parent:FindFirstChildWhichIsA("Humanoid") then
        print("oh no player got in contact with explosion!!!!, player character:", part.Parent.Name)
    end
end)
0
i feel embarassed by this answer GrandMarineLCS 0 — 1y
0
I glad to help imKirda 4491 — 1y
0
what are you waiting for? accept his answer T3_MasterGamer 2189 — 1y
Ad

Answer this question