嗯,在 Team GUI 中。当我选择一个团队时,它会提供工具,但不起作用。就像给枪但不开枪一样。
local taser = false
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
player.TeamColor = BrickColor.new("Electric blue")
script.Parent.Parent.Parent.Visible = false
if player.Backpack:FindFirstChild("Taser") then
taser = true
else
taser = false
end
if player.Character:FindFirstChild("Taser") then
taser = true
else
taser = false
end
if taser == false then
game.ReplicatedStorage.Taser:Clone().Parent = player.Backpack
end
end)
这是用于团队专用工具的脚本
您应该使用
remoteEvent
从 server
而不是从 localscript
提供工具。