Help me way dose my Touched dose not fire

Help me way dose my Touched dose not fire

the script:

Wqw.Touched:Connect(function(Hit)

if Hit.Name == "WHit" then
	
	local plrWatter = Hit.Parent.WWW.dd.Watter

	plrWatter.Value = plrWatter.Value + ggf
	Watterrr.Value = Watterrr.Value - ggf
	
	
end

end)

What is Wqw is it a part or something else?

But your touch function is prob not working because whenever something touches it, it ist called “WHit”

1 Like

It’s looking for extremely specific parts. Assuming this is all the script does, here’s a fix/more optimized way:

Wqw.Touched:Connect(function(Hit)
    if Hit.Name == "WHit" then
        local plrWatter = Hit.Parent:FindFirstChild("WWW") and Hit.Parent.WWW.dd:FindFirstChild("Watter")
        local Watterrr = script.Parent:FindFirstChild("Watterrr")

        if plrWatter and Watterrr then
            plrWatter.Value = plrWatter.Value + ggf
            Watterrr.Value = Watterrr.Value - ggf
        else
            warn("Watterrr or plrWatter is missing!")
        end
    end
end)
1 Like

here is the full Script:

local WatterD = script.Parent

local Watterrr = WatterD.Parent.WatterDropf.Watter

local Wqw = Watterrr.Parent

local kf = 0

local V = Wqw.V

V.Value = Watterrr.Value

local function ks(Hit)

WatterD.Anchored = true

if Hit:FindFirstChild("HHitG").Value == 1 then

	Wqw.Position = Vector3.new(WatterD.Position.X,1,WatterD.Position.Z)


end


Wqw.Transparency = 0

WatterD:Destroy()


local TweenService = game:GetService("TweenService")


local tweenInfo = TweenInfo.new(
	1.1, -- Time
	Enum.EasingStyle.Quint, -- EasingStyle
	Enum.EasingDirection.Out, -- EasingDirection
	0, -- RepeatCount (when less than zero the tween will loop indefinitely)
	false, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)

local tween = TweenService:Create(Wqw, tweenInfo, { Size = Vector3.new(0.063, 2.352, 2.352) })

tween:Play()


while wait(math.random(3,6)) do
	
	
	Watterrr.Value = Watterrr.Value - 1
	
	
	if Watterrr.Value < 0.1 then
		
		Wqw:Destroy()
		
		break
	end
	
end

end

local ggf = V.Value / 11

Wqw.Touched:Connect(function(Hit)

if Hit.Name == "WHit" then
	
	local plrWatter = Hit.Parent.WWW.dd.Watter

	plrWatter.Value = plrWatter.Value + ggf
	Watterrr.Value = Watterrr.Value - ggf
	
	
end

end)

Watterrr.Changed:Connect(function()

Wqw.Transparency = Watterrr.Value / V.Value

end)

WatterD.Touched:Connect(function(Hit)

if Hit.Name == "WHit" then
	
	if Hit.Parent.FindFirstChild("Dead?").Value == 0 then
		
		Hit.Parent.WWW.dd.Watter.Value = Hit.Parent.WWW.dd.Watter.Value + Watterrr.Value

		WatterD.Parent:Destroy()
		
	end
else
	
	if Hit:FindFirstChild("HHitG") then
		
		wait(0.1)
		
		if kf == 0 then
			ks(Hit)
			kf = 1
		end
		
	end
end

end)

–0.063, 2.352, 6

Try putting print statements after each check to see which one runs and which one doesn’t. Also I recommend naming your variables properly instead of gibberish, for ease of reading

Replace the if statement in your touched code with this

if Hit.Parent:FindFirstChild(“Humanoid”) then

nevermind i fixed it with making a simulare script in starter chr…

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