This works in Studio, but not when I try it in an actual game and I have no idea why.
bin = script.Parent Me = script.Parent.Parent.Parent me = Me name = "Sky Dragon's Drive" Backpack = bin.Parent Player1 = Backpack.Parent Player = Player1.Character Hum = Player.Humanoid Run = game:GetService("RunService") color = BrickColor.new("Black") COOLDOWN = 10 function onButton1Down(mouse) enabled = true MagicSym = Instance.new("Part") MagicSym.Parent = me.Character MagicSym.Anchored = true MagicSym.CanCollide = false MagicSym.formFactor = "Symmetric" MagicSym.BrickColor = BrickColor.new(0) MagicSym.Transparency = 1 MagicSym.Name = "MagicSym" MagicSym.Size = Vector3.new(12,.5,12) MagicSym.TopSurface = "Smooth" MagicSym.BottomSurface = "Smooth" MagicSym.CFrame = me.Character.Torso.CFrame*CFrame.new(0, -3.1, 0 ) d = Instance.new("Decal") d.Name = "Circle" d.Parent = MagicSym d.Face = "Top" d.Texture = "" p = Instance.new("Decal") p.Name = "Circle" p.Parent = MagicSym p.Face = "Bottom" p.Texture = d.Texture game.Debris:AddItem(MagicSym,2) d = Instance.new("StringValue",me.Backpack) d.Name = "Drive" print("Derp") x = Instance.new("Part", Player) x.Size = Vector3.new(4,4,4) x.Shape = "Ball" x.BrickColor = color x.Transparency = 0.9 x.Position = Player.Torso.Position x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.CanCollide = false x.Anchored = false z = Instance.new("SpecialMesh") z.MeshType = "FileMesh" z.MeshId = "http://www.roblox.com/asset/?id=12212520" z.Scale = Vector3.new(0,0,0) z.Parent = x local emitter = script.ParticleEmitter:Clone() emitter.Parent = x w1 = Instance.new("Weld", Player) w1.Part0 = Player["Torso"] w1.Part1 = x w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) *CFrame.new(0,-1.5, 0) fd = script.Firedamage:clone() fd.Parent = x p = script.PointLight:clone() p.Parent = x p.Brightness = 0 o = Instance.new("StringValue",x) o.Value = me.Name o.Name = "Owner" ws = Hum.WalkSpeed + 1 wait(0.25) for Charging = 1, 50 do z.Scale = z.Scale + Vector3.new(0.1,.3,.1) p.Brightness = p.Brightness + .1 Run.Stepped:wait(0.05) end fd.Disabled = false Hum.WalkSpeed = 80 Hum.MaxHealth = 150 Hum.Health = (Hum.Health) + (30) for i = 1,60 do z.Scale = z.Scale + Vector3.new(.1,.3,.1) p.Range = p.Range + 1 p.Brightness = p.Brightness + 1 x.Transparency = x.Transparency - .05 wait(.25) z.Scale = z.Scale - Vector3.new(.1,.3,.1) p.Range = p.Range - 1 x.Transparency = x.Transparency + .05 p.Brightness = p.Brightness - 1 wait(.25) end for ChargedEnd = 1, 50 do z.Scale = z.Scale - Vector3.new(.1,.3,.1) p.Brightness = p.Brightness - .1 x.Transparency = x.Transparency + .2 Run.Stepped:wait(0.02) end d:remove() Hum.WalkSpeed = ws Hum.MaxHealth = 100 x:remove() wait(COOLDOWN) enabled = true end enabled = true function onS(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onS)
Here this should help it helped me with this same problem
https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online
Is this a SB script? If it is, let me fix this for you.
bin = script.Parent Me = game.Players.LocalPlayer -- I changed it to LocalPlayer instead of your regular one. me = Me
If that does not work, I don't know the problem.