original title, huh? basically, i have a flaregun tool, but i want the tool to only work if the player has another item, ive tried many things like disabling an enabling the flaregun script from another script detecting if a certain tools parent is = to the character, here is most of the script (server script in the tool):
local IsReady = true
local Module = require(game.ServerScriptService.FlareGun)
local EnforcementRandom = math.random(1, 3)
local Enforcement1 = workspace.Folder.FlareEnforcement1
local Enforcement2 = workspace.Folder.FlareEnforcement2
local Enforcement3 = workspace.Folder.FlareEnforcement3
local FlareContactUI = game:GetService("StarterGui").FlareContact
local TweenService = game:GetService("TweenService")
local Character
local Humanoid
local Flare = workspace.Flare
function BodyVelocityFlare()
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(400000, 400000, 400000)
BodyVelocity.P = 10000
BodyVelocity.Velocity = Vector3.new(0, 100, 0)
BodyVelocity.Parent = Flare.Handle
end
script.Parent.Equipped:Connect(function()
Character = script.Parent.Parent
Humanoid = Character.Humanoid
local FlareReloadAnim = Humanoid.Animator:LoadAnimation(script.Parent.FlareReload)
local FlareShootAnim = Humanoid.Animator:LoadAnimation(script.Parent.FlareShoot)
FlareContactUI.TextLabel.Visible = true
script.Parent.Activated:Connect(function()
if IsReady == true then
IsReady = false
script.Parent.Handle.Load:Play()
FlareReloadAnim:Play()
FlareReloadAnim.Stopped:Connect(function()
FlareShootAnim:Play()
end)
FlareShootAnim.Stopped:Connect(function()
script.Parent.Handle.Fire:Play()
BodyVelocityFlare()
end)
wait(10)
if EnforcementRandom == 1 then
Enforcement1:Play()
FlareContactUI.TextLabel.Text = "All units, close on suspect."
tween2:Play()
wait(10)
tween:Play()
end
if EnforcementRandom == 2 then
Enforcement2:Play()
FlareContactUI.TextLabel.Text = "Contact Confirmed."
tween2:Play()
wait(10)
tween:Play()
end
if EnforcementRandom == 3 then
Enforcement3:Play()
FlareContactUI.TextLabel.Text = "Target compromised, move in-move in."
tween2:Play()
wait(10)
tween:Play()
end
Module.HelicopterCall()
--[[Module.CallDrop(
{
script.Parent,
script.Parent.Handle.Position,
}
)
--]]
IsReady = false
end
end)
end)
(on the side, there is another problem where a UI with a text label should show up but it doesnt, i removed the tweens but ill add them back if asked)