Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this Script Work in Test Mode Only?

Asked by 10 years ago

I know it's a free model, but I've always wondered WHY it stopped working. I know some ROBLOX update broke it around a year ago. It caused most vehicle tool scripts to break and not do anything when commanded. Can anyone look at it and see what's wrong with it please? It works fine in Test mode, just not in online

Here's the script:

001fly = false
002turn = false
003fire = true
004a = 25
005hover = false
006 
007function onFire(gun)
008    local b = Instance.new("Part")
009    b.Parent = game.Workspace
010    b.CFrame = gun.CFrame + (gun.CFrame.lookVector * 10)
011    b.formFactor = 2
012    b.Size = Vector3.new(1,1,2)
013    b.TopSurface = 0
014    b.BottomSurface = 0
015    b.BrickColor = BrickColor.new(24)
View all 164 lines...

1 answer

Log in to vote
1
Answered by 10 years ago

At the beginning of the script add: Repeat wait() until game.Players.Localplayer.Character . From what I know, scripts in test mode tend to load faster than the actual server can load you. You just have to add some waits until the character has loaded.

Ad

Answer this question