Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why did the script does not work as expected?

I was playing around with my studio and I made this simple script:

script.Parent.Touched:Connect(function()
	print("hello")
	script.Parent.BrickColor = BrickColor.Red()
end)

Somehow, it does not prints "hello". However, the part turns red automatically. My part color in the game is green, but it shows as red whenever I play. Anyone have this same problem and any suggestions to fix it?

2 comments

1

Maybe it's touching an unanchored part. That wouldn't explain the hello not being printed though.. maybe another script is editing the color...

0

I tested the brick out with anchored and no other script is functioning to edit the part. Thanks for answering!

2 answers

✓ Accepted answer

It's probably because you're sending too many requests. Add a wait or a debounce after. That's the only explanation I can think of. Though it doesn't make sense. I am also having unexplainable problems.

1 comment

0

Thanks for answering, and sorry for the late respond. I was quitting scriptinghelpers for a while and now i'm back! Thanks alot for your respond :)

Dude, looking back I might accidentally typed a space in the Output Find feature and "hello" itself doesn't have a space which might be the reason why the other lines appear but "hello" doesn't

This is the stupidest question I have ever made

This discussion is preserved as it was. New answers, comments, and votes are closed.