Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Something's wrong with the gui that I click to give me money (Help)?

Hi, I have a datastore script that saves likes its suppose to, but when I click the gui that gives me money and leave it doesnt work. I tried going on console and giving myself money and I left, it worked. I think somethings wrong with the gui but I dont know what. It shows its changing the money but it doesnt save it. Heres the script

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()

player.leaderstats.Money.Value = player.leaderstats.Money.Value + 1

end)

1 comment

0

Well datastores dont work like before, so i suppose for your problem, u should use the datastore2 tutorial in GUI Form, I can help if you want.

1 answer

✓ Accepted answer

You cannot alter an instance via local script if your game has FilteringEnabled on, which it should. Instead, you will have to approach the problem with a RemoteEvent. Check out this page on the Roblox documentation for examples of how to use remote events.

2 comments

0

Thanks, but I cant accept your answer.

0

Nevermind, now it's letting me.

This discussion is preserved as it was. New answers, comments, and votes are closed.