Well, I've put my tools in ReplicatedStorage in hopes that it would hold the tools safely. I have also tried Lighting but nothing worked. What I meant by "safely" is that the Handle of the tool would actually show up in game. These tools are simple one piece swords that show up in studio but not ingame.
Here's the script. Can you spot anything wrong?
local p = game.Players.LocalPlayer
repeat wait() until p.Character
local c = p.Character
c.Torso.Anchored = true
h = c.Humanoid
BG = script.Parent.Frame
light = BG.Assassin
balanced = BG.Knight
heavy = BG.Tank
local h = c.Humanoid
face = c.Head:FindFirstChild("face")
repeat wait() until face
face:remove()
game.StarterGui:SetCoreGuiEnabled(4, false)
game.StarterGui:SetCoreGuiEnabled(2, true)
game.StarterGui:SetCoreGuiEnabled(3, true)
if p.TeamColor == BrickColor.new("Bright red") then
spawner = Workspace["Red spawners"]:GetChildren()
elseif p.TeamColor == BrickColor.new("Bright blue") then
spawner = Workspace["Blue spawners"]:GetChildren()
end
local function Spawn()
spawn = spawner[math.random(1, #spawner)]
c:MoveTo(spawn.Position)
BG.Visible = false
c.Torso.Anchored = false
end
light.MouseButton1Down:connect(
function()
print("Light selected")
local sword = game.ReplicatedStorage.Assassin:Clone()
sword.Parent = p.Backpack
lt = script.light:Clone()
lt.Disabled = false
lt.Parent = p.Backpack
Spawn()
end
)
balanced.MouseButton1Down:connect(
function()
print("Knight selected")
local sword = game.ReplicatedStorage.Balanced:Clone()
sword.Parent = p.Backpack
kt = script.knight:Clone()
kt.Disabled = false
kt.Parent = p.Backpack
Spawn()
end
)
heavy.MouseButton1Down:connect(
function()
print("Tank selected")
local sword = game.ReplicatedStorage.Tank:Clone()
sword.Parent = p.Backpack
tk = script.tank:Clone()
tk.Disabled = false
tk.Parent = p.Backpack
Spawn()
end
)
