Okay So basically heres the deal. I have a system that when you push a button you get an ite from the store if you have enough money.
Right now I have the Tools located in ReplicatedStorage. I basically want the gun to clone from replicated storage to the players backpack when you push the button. It was working fine with FE off but not with it on.
This particular script is one of the buttons pushed to clone the tool if you have enough money (basically buy a gun from the store). So when you push this button it clones the gun fro replicated storage into th players BackPack (but as I stated below, not working with FE On). Please iff you have any questions ask them as I need help with this. Thanks in advance.
local SaveToDataStore = game.ReplicatedStorage.SaveToDataStore
local player = game.Players.LocalPlayer
local money = player.leaderstats.Money
for _, button in pairs(script.Parent:GetChildren()) do
if button:IsA("TextButton") then
button.MouseButton1Click:Connect(function()
if money.Value >= button.Cost.Value then
money.Value = money.Value - button.Cost.Value
game.ReplicatedStorage.Guns["Glock 32"]:Clone().Parent = player.StarterGear
game.ReplicatedStorage.Guns["Glock 32"]:Clone().Parent = player.Backpack
SaveToDataStore:FireServer(money.Value)
end
end)
end
end
PLEASE HELP ME WITH THIS. I AM NEARLY FINISHED MY GAME AND AM STUCK RIGHT NOW.

1 comment
what do u mean when you say -- These are not accurate you need to change the values? What do I change them too?