I made a paintball game, but the gun only works in the test mode in Studio, but not in Player... WHAT DO I DOOOO! Thanks for any of the help, the Script is here,
LOCAL SCRIPT `local player = game.Players.LocalPlayer local mouse = player:GetMouse() local tool = script.Parent local handle = tool:WaitForChild("Handle")
PaintColors = {Color3.new(255/255, 0/255, 0/255), Color3.new(0/255, 255/255, 0/255), Color3.new(0/255, 0/255, 255/255)}
RS = player.Character:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")
local enabled = true
tool.Activated:connect(function() if enabled == false then return end enabled = false handle:FindFirstChild("Fire"):Play() local Paint = Instance.new("Part") Paint.Size = Vector3.new(1, 1, 1) Paint.Shape = "Ball" Paint.TopSurface = "Smooth" Paint.BottomSurface = "Smooth" Paint.Color = PaintColors[math.random(1, #PaintColors)] m = Instance.new("SpecialMesh", Paint) m.Scale = Vector3.new(.2, .2, .2) BV = Instance.new("BodyVelocity") BV.velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*100 BV.maxForce = Vector3.new(math.huge, math.huge, math.huge) Paint.Parent = workspace BV.Parent = Paint Paint.CFrame = handle.CFrame * CFrame.new(0, 2, 0) local damage = script.Script:clone() damage.Parent = Paint wait(1) enabled = true end)`
That is the first peice of code dirrectly int he Paintball Gun, But there is 1 more Peice of code inside of this peice
SCRIPT `script.Parent.Touched:connect(function(hit)
local char = hit.Parent
local hum = char:FindFirstChild("Humanoid")
if hum ~= nil then
hum.Health = 0
script.Death:Play()
end
script.Parent.Anchored = true
script.Parent:FindFirstChild("Mesh").Scale = Vector3.new(0.1, 0.1, 0.1)
F = Instance.new("Fire")
F.Parent = script.Parent
F.Size = 3
F.Color = script.Parent.Color
wait(1)
F.Parent = nil
script.Parent:remove()
end) `
And thats it, it only appears in Roblox Studio Test Mode, Not in Player......

1 comment
Actually, the First one is a Script As Well. Thanks!