So I made a script that reduces the player's hp and makes a fire on their humanoid. Here is my script.
--Makes the person who touches it become the Flash
local speedBoost = game.Workspace.SpeedBoost
local function onTouch(otherGoodPart)
local character = otherGoodPart.Parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if humanoid and humanoid.Health > 50 then
humanoid.Health = 40
print("Sorry for this")
end
local fire = Instance.new("Fire")
fire.Parent = humanoid
end
speedBoost.Touched:Connect(onTouch)

1 comment
Also just wanted to say the fire is created just not on the humanoid. Also I wasn't able to find the humanoid so can you help on that too?