How Can I Make This Touched Function Work Properly in Normal Servers?
Asked by
8 years ago Edited 8 years ago
How can I make this touched function work in normal servers? There are two simple scripts: One script is located in ServerScriptService which creates the falling parts, and it inserts the second script into each part. The second script is located in ServerStorage, and it has a simple onTouched function:
1 | script.Parent.Touched:connect( function (hit) |
3 | script.Parent.Anchored = true |
4 | script.Parent.RotVelocity = Vector 3. new( 0 , 0 , 0 ) |
All the scripts function great when I play in Roblox Studio. Here is a GIF showing how it is suppose to work: http://www.giphy.com/gifs/3oz8xXd07rTffQokEw
However, when I play in a server, some parts anchor mid air, and sometimes the touched script does not change the RotVelocity to (0, 0, 0). Here is another GIF illustrating how messed up the game is: http://www.giphy.com/gifs/l0HluLPMclF5GTOOk
Why is this happening? Is there a way to make it work like when I play in Roblox Studio? Thank you for reading this!