#help pls
20 messages · Page 1 of 1 (latest)
try using luau
Sell button?
put this script in the button
local but = script.Parent
local plr = game.Players.LocalPlayer
but.MouseButton1Click:Connect(function()
plr.Cash.Value += plr.Bottle.Value
plr.Bottle.Value = 0
end)
Here you need to sell bottle for cash
This is localscript
HANDLE ALL VALUES ON THE SERVER!!! 🤬🤬🤬🤬
what
oh
no)
alr if you want for server
game.Players.PlayerAdded:Connect(function(plr)
local but = script.Parent
but.MouseButton1Click:Connect(function()
plr.Cash.Value += plr.Bottle.Value
plr.Bottle.Value = 0
end)
end)
Wtf?
1: server scripts cant run in the GUI?
2: Servers cant detect if the client passed an event
Then it will only be the local player that can see the money. Thats why you should make it on the server. Also always check on the server if the player needs to buy anything and if he has enough money on the server.