Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I finish my donate Gui and is it in the right script?

Asked by 2 years ago

So I have made some of the script and now I am stuck. I don't know how to do it anymore. I have put it in a local script and am not sure if I put it somewhere else. Anyways here is my script so far.

-- MCBD means money can be donated
local MCBD = ("1,1000")

local PO = game.Players.Name
-- PO is checking if the player is in the game (PO means player online)
local LP = game.Players.LocalPlayer
-- This is looking at the local player (LP means Local player)
local PL = game.Players.LocalPlayer.leaderstats.Cash
    -- This checks the players leaderstats (PL means players leaderstats)


if script.Parent.Text == MCBD then
    if script.Parent.Parent.PL.Text == PO then
        PL.Value =- script.Parent.Parent.Money.Text
        script.Parent.Parent.PL.Text
    end

end

1 answer

Log in to vote
0
Answered by 2 years ago

You cant change cash value with a local script since that will only change it for the local client, you would need to make a remote event and a script that will activate when the remove event fires the local script would trigger the remove event

Ad

Answer this question