oh, make it => instead of >= and please let me see the output
does this script look like it should be?
local canbuy
local prox = script.Parent
local wall = script.Parent.Parent.Parent.wall
print("1")
canbuy = false
local players = game:GetService("Players")
local player = players.LocalPlayer
local fuel = player.leaderstats.fuel
print("2")
script.Parent.Triggered:Connect(function()
print("3")
while wait(1) do
if fuel.Value >= 50 then
canbuy = true
end
end
print("4")
if canbuy == true then
print("6")
fuel.Value = fuel.Value + -50
canbuy = false
else
print("7")
fuel.Value = fuel.Value + 0
end
end)
the reason i wonât show you is cause there is nothing about the script in the output
Please read the answer I wrote, this one will not work because code will not continue because of the while loop, also there is no need for loop.
You can use this instead fuel.Value -= 50
to subtract and fuel.Value += 50
to add.
Changing Fuel
value by localscript wonât effect to server due to filtering enabled.
You must handle ProximyPromptâs event by server and send RemoteEvent to client to delete wall.
This is literally what I said but the owner of the post did not care.
1 Like