Touched event does not fire

i realized one thing

while SeeingTarget == true do
	Shoot()
end

please do not do this unless you want your game to crash. this will fire Shoot() endlessly without a single rest.

and consider changing SeeingTarget into a BoolValue so .Changed works, and don’t use while true loops unless you know what you’re doing.

2 Likes

If you look in the script at the top,SeeingTarget is a boolean it is set to false

local SeeingTarget = false
2 Likes

i am talking about a game object not a variable. BoolValue has the same functions as Boolean, but BoolValue is an actual object.

1 Like

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