NOTE: I'm posting this question multiple times yet no one answers it. ANSWER IT NOW.
So I'm making a game with a shop that you can buy Auras, This script gives you the aura when you buy it, but it doesn't let you unequip an Aura. Someone help me?
Also does this script buys the thing multiple times even though it is supposed to buy it a single time and let you equip and unequip, if true then help me. Here's the local script:
local player = game.Players.LocalPlayer or game.Players.Players.PlayerAdded:wait()
local char = player.character or player.Character or player.CharacterAdded:Wait()
local auraEventBlue = game.ReplicatedStorage.AuraEventBlue
local variable = false
local PurchaseMeter = true
script.Parent.MouseButton1Down:Connect(function()
for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("leaderstats") then
if v.leaderstats.Credits.Value >= 35 then
if PurchaseMeter == true then
end
v.leaderstats.Credits.Value = v.leaderstats.Credits.Value - 35
PurchaseMeter = false
if not variable then
variable = true
auraEventBlue:FireServer(char)
script.Parent.Text = "Disable"
else
variable = false
char.HumanoidRootPart.BlueEffect:Destroy()
script.Parent.Text = "Enable"
end
end
end
end
end)

3 comments
anyone answer my question https://scriptinghelpers.org/questions/103646/how-can-i-make-a-player-search-thing
its because your toggles are wrong. or debounce. why is your mouse button1down function ending like instantly? your function ends and there is nothing inside of it. no code at all.
talk to me in sh chat