Hey everyone, So today… I was scripting a bookshelf, it was suppose to open when you click on the blue book. I thought I did everything right. There were no problems in the output either. I went to go test it out but It didn’t do anything. I am not sure if it’s because of the sound or not. I also have both of the parts anchored so I am not sure if that is the problem. I’ve looked but I couldn’t find anything. If anyone knows what I did wrong, please let me know!
I dont think that click detectors put in a hit
parameter
try and remove that, and remove the if
end
part
The one parameter will be the player who clicked, but the name you give it doesn’t really matter. A player will still pass through the conditional.
did you set the maxactivationdistance of your clickdetector
My idea is to maybe remove the if statement
Try removing the if statement. It isn’t needed.
I doubt that will fix it, but you should try anyways.
And you don’t need to have the parts unanchored. You can tween anchored parts.
No, I did not. I am not really sure how to write that.
I did that, didn’t work. Thanks for trying anyways :))
Did that, did not do anything.
did that, didn’t fix it. Thanks for trying anyways.
This is my updated script with the distance, is this correct?
nvm it didn’t work. I’m probably just gonna make it so when you click on the shelf the tween runs.
maybe instead of script.Parent.ClickDetector
do ClickDetector
because you already have a variable for the detector
I’m just throwing wild guesses here but, are you trying to tween a model, or is it a union or part of some sort?
Might be wrong, but I feel like 10 studs away is pretty close for the Max Activation Distance. Maybe increase it.
Also, try adding a print function to ensure that the script isn’t running and that there is something wrong with the tween.
It’s a union, I got it figured out tho, I just didn’t use the book.