Scripts resetting to print("Hello World!") upon game loading?
Asked by
5 years ago Edited 5 years ago
So everything works fine in studio but nothing works in game. When I look at errors in game on client it says "Hello World!" a bunch. So I am guessing the scripts reset when I load in to the default code? And then on the server side it says hello world once and game script timeout. The game script that timed out is here:
01 | local pos = Vector 3. new( 0 , 5 , 0 ) |
03 | game.Workspace.ChildAdded:Connect( function (child) |
04 | if child:FindFirstChild( "Humanoid" ) then |
05 | local cloud = game.ServerStorage.Cloud:Clone() |
07 | cloud.Parent = game.Workspace |
08 | cloud.Position = child.Head.Position + pos |
09 | if child.Humanoid.Health = = 0 then |
The script just makes this cloud thats inside the character follow it above its head. I would like any optimizations and a possible fix. Also if you need screen shots I can provide them. Thanks!