So, here’s my issue. When equipping this specific tool, it doesn’t work and it goes invisible.
Photo
So I tried searching the issue on Google and on the Dev forums, however I’m still pretty clueless on what the issue might be. In the thread “Tool in Replicated Storage going invisible”, the issue was the Massless property was enabled, but it’s disabled on my end. The only other thread I could see from my scrolling was the thread “Tool invisible when equipped?”, however, I’m unsure how they fixed their issue.
It’s under ReplicatedStorage, and here’s what I got.
Photo
Here’s the scripts. It’s a very old game and none of the assets are being reused in the new version, which is why I don’t mind posting the scripts here. I do want it to still work, though.
Server script
--[Removed] & [Removed]
local Tool = script.Parent
local Origin = Tool:WaitForChild('Origin') --This is important, the origin should always be a child of Tool, not just a descendant
local FireEvent = Tool.Client:WaitForChild('Fire')
local GEM = require(game.ReplicatedStorage.GEM)
local ROF = .15 -- Rate of fire
local Speed = 600 -- Bullet speed
local Size = 0.5
local ShootSound = Origin:WaitForChild('Sound')
local TriggerState = 'Released'
local LastShot
for _, Items in pairs(script.Parent.PB2:GetChildren()) do
GEM.Welding(script.Parent.Handle, Items)
end
GEM.Welding(script.Parent.Handle, Origin)
script.Parent.Handle.Anchored = false
function Shoot(Player)
local Bullet
local Smoke
if not game:GetService('ServerStorage'):FindFirstChild('Bullet') then
Bullet = Instance.new('Part', game:GetService('ServerStorage'))
Bullet.Size = Vector3.new(Size, Size, Size)
Bullet.Shape = Enum.PartType.Ball
Bullet.CustomPhysicalProperties = PhysicalProperties.new(.2, .1, .1)
Bullet.BrickColor = BrickColor.Random()
Bullet.Material = Enum.Material.Neon
else
Bullet = game:GetService('ServerStorage').Bullet:Clone()
end
if not game:GetService('ServerStorage'):FindFirstChild('Smoke') then
Smoke = Instance.new('Part', game:GetService('ServerStorage'))
Smoke.Size = Vector3.new(.4, .4, .4)
Smoke.BrickColor = BrickColor.Gray()
Smoke.Transparency = .7
Smoke.CanCollide = false
Smoke.Anchored = true
else
Smoke = game:GetService('ServerStorage').Smoke:Clone()
end
Smoke.Rotation = Origin.Rotation * Vector3.new(math.random(1, 360), math.random(1, 360), math.random(1, 360))
Smoke.Position = Origin.Position + Origin.CFrame.lookVector * 1
Smoke.Parent = workspace
game.Debris:AddItem(Smoke, .05)
Bullet.Position = Origin.Position
Bullet.Velocity = Origin.CFrame.lookVector * Vector3.new(Speed, Speed, Speed)
Bullet.Parent = workspace
local CloneSound = ShootSound:Clone()
CloneSound.Parent = ShootSound.Parent
CloneSound:Destroy()
--local Smoke = Instance.new('Part')
Bullet.Touched:Connect(function(Hit)
for _, Player in pairs(game.Players:GetPlayers()) do
if Hit:IsDescendantOf(Player.Character) and not Hit:IsDescendantOf(script.Parent) then
if Player.Character:FindFirstChild("PaintballGun") or Player.Backpack:FindFirstChild("PaintballGun") then
game.ReplicatedStorage.GameController:FireClient(Player, {"Arena", "Dead"})
--Player.Character.Humanoid:TakeDamage(100)
end
end
end
if Hit ~= Origin and Hit ~= script.Parent.Handle and not Hit:IsDescendantOf(script.Parent.PB2) then
Bullet:Destroy()
end
end)
end
function Trigger(...)
local Tuple = {...}
local Player = Tuple[1]
local Action = Tuple[2]
if Action == 'TriggerRelease' then --Stop firing
TriggerState = 'Released'
elseif Action == 'TriggerPull' then --Start firing
TriggerState = 'Pulled'
while TriggerState == 'Pulled' do
wait()
if LastShot then
if tick() - LastShot > ROF then
if TriggerState == 'Pulled' then
Shoot(Player)
LastShot = tick()
end
end
else
if TriggerState == 'Pulled' then
Shoot(Player)
LastShot = tick()
end
end
end
end
end
FireEvent.OnServerEvent:Connect(Trigger)
Bullet script (This was all that was in it)
-- Bullet | Coded by [Removed] on 12 / 22 / 17 for Baked Cafe V1
Client script
--[Removed]
local FireEvent = script:WaitForChild('Fire')
local Tool = script.Parent
function Equipped(Mouse)
Mouse.Button1Down:Connect(function() --Left mouse button is down
FireEvent:FireServer('TriggerPull')
end)
Mouse.Button1Up:Connect(function() --Left mouse button is up
FireEvent:FireServer('TriggerRelease')
end)
end
Tool.Equipped:Connect(Equipped)