Killbrick kills anyway

  1. **Im testing something that when boolvalue called dodgeframe is true killbrick dont kill the player

  2. **killbrick kill the player anyway

 local lav = script.Parent

function kill(hit)
	local karakter = hit.Parent
	local humanoid = karakter:FindFirstChildOfClass("Humanoid")

	if humanoid then
		local player = game.Players:GetPlayerFromCharacter(karakter)
		if player then
			local dodgeframe = player:WaitForChild("Values"):FindFirstChild("DodgeFrame")
			if dodgeframe.Value == false then
				humanoid.Health = 0
			end
		end
	end
end

lav.Touched:Connect(kill)



1 Like

Why do you have two functions with the same name and what does the first function do?

Try disabling the first function and see if it does something

Oh my bad it pasted wrong it letme fix it

Can you show where the value is or how it has been created

image
its in here and its true after pressing q so there is no problem about it

Are you changing this value on the client or server?

1 Like

in local script I realised now I didn’t think about it im gonna try remote event

1 Like

Ye it works now I forgat about client thank you.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.