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

Why is it So that my Filtering Enabled Gun Works in Studio, but not in the Real Game?

Asked by 7 years ago

My filtering enabled gun works fine in studio, but the bullet just floats in game. I need some help

Would it be that my filtering enabled gun script shouldn't be in the workspace, or is there another problem?

Local Script for Gun Tool

01Player = game.Players.LocalPlayer
02local Gui
03Ammo = 10
04script.Parent.Equipped:connect(function(Mouse)
05    Gui = script.Parent.AmoGui:clone()
06    Gui.Parent = Player.PlayerGui
07    Mouse.Button1Down:connect(function()
08        if Ammo > 0 then
09            workspace.FE.PistolShot.Shot:FireServer()
10            Ammo = Ammo - 1
11            Gui.BG.Text.Text = Ammo.."/10"
12        end
13    end)
14    Mouse.KeyDown:connect(function(Key)
15        if Key == "r" and Ammo < 10 then
View all 26 lines...

Script for Shooting Gun

01local Bullet
02script.Shot.OnServerEvent:connect(function(Client)
03    local R = script.GunShot:clone()
04    R.Parent = Client.Character.Pistol.Handle
05    R:Play()
06    Bullet = Instance.new("Part", workspace)
07    Bullet.Size = Vector3.new(1, 1, 1)
08    Bullet.Transparency = 1
09    local Trail = script.Beam:Clone()
10    Trail.Parent = Bullet
11    Trail.Enabled = true
12    local A0 = Instance.new("Attachment", Client.Character.Pistol.Handle)
13    local A1 = Instance.new("Attachment", Bullet)
14    Trail.Attachment0 = A0
15    Trail.Attachment1 = A1
View all 42 lines...
0
Any errors in game? You can open up the dev console and look for errors by saying "/console" in chat. dispeller 200 — 7y
0
Nope, all fine, tried that OFanTDMO 50 — 7y

Answer this question