Why is this script not turning a specific part?
Asked by
8 years ago Edited 8 years ago
EDIT: I fixed it by messing around with some variable and creating a BoolValue and using that to check it properly. All answers will not be needed. Thank you for you time
I am creating a dropper and when you drop a bucket in there, it plays a sound. This works but then I am making it so two unions turn (Both with the same script) when the sound is playing and when the sound has reached a certain TimePosition it will stop. Now I have gotten this code because the value auto set to 1 for some reason. Now it will not even rotate the part. Why?
SCRIPT INSIDE THE INTVALUE
1 | while script.Parent.Parent.Parent.Parent.Parent.Sound.TimePosition < 5 and script.Parent.Parent.Parent.Parent.Parent.Sound.TimePosition > 0.1 do |
3 | script.Parent.Value = 1 |
6 | while script.Parent.Parent.Parent.Parent.Parent.Sound.TimePosition > 5 or script.Parent.Parent.Parent.Parent.Parent.Sound.TimePosition = = 0 do |
8 | script.Parent.Value = 0 |
SCRIPT INSIDE THE PARTS THAT ARE MEANT TO ROTATE
3 | while script.Parent.Parent.Value.Value = = 1 do |
4 | script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ( 0 , 0.1 , 0 ) |
Here is image reference as how I am setting it out. Hopefully this is all the code you need to help me. Feel free to comment to ask for more code or point out a silly mishap.