When I tried, it didn't work. Also, would I need to make a hitbox type of thing? I'm really stumped.
I'm not gonna give you any code, but let me give you instructions so you can learn. 1. No, you don't really need a hitbox, just a part. 2. Set up a basic debounce system, as well as a OnTouched system 3. If debounce is ready, then check the object that hit the "hitbox" for a humanoid 4. This is the only code I will give you pretend "plyr" is the character that touched the object variable.
local players = game.Players local find = players:FindFirstChild(plyr.Name) local plygui = find. --I forgot what it was called --from here on, you can copy/make a gui visible.
I tried this
script.Parent.Touched:Connect(function(hit) local debounce = false if not debounce then debounce = true print("Brick was touched!") wait(5) debounce = false end end)
Part = script.Parent function onTouch() Part.BrickColor = BrickColor.Random() end script.Parent.Touched:Connect(onTouch