There is probably a generic solution to this that I’m not thinking of, but I’m confused!
I’m trying to get the script to detect the player and a hitbox that spawns when the player dodges. Why do I want to find both just to blind them with sand? Testing. Anyways, I’m having trouble when the If statement tries to detect 2 or more objects touched. I can’t find a solution after scowering the internet for 1-2 hours.
Hitbox.Touched:Connect(function(hit)
local hitplayer = game.Players:GetPlayerFromCharacter(hit.Parent)
local humanoid = hit.Parent:FindFirstChildOfClass(“Humanoid”)
if hitplayer and hit.Name == (“Dodged”) then
BlurEffect:FireClient(hitplayer)
humanoid.WalkSpeed = 2
task.wait(3)
humanoid.WalkSpeed = 16
end
end)