What do you want to achieve?
I want to be able to make a command that the player can say that changes their leaderstats serverside. “/e cash 1000” or something like that.
What is the issue?
well, i can’t find any topics about entering a third value in the function so i don’t know how to.
What solutions have you tried so far?
I tried to search it up on the forums but I couldn’t find anything. Only chat animations like “/e sit” and stuff.
You can use :sub() to match the first 8 characters with "/e cash ", and then use :split() to check the value after.
Code:
player.Chatted:Connect(function(message)
if message:sub(1, 8) == "/e cash " then
local cash = tonumber(message:split(" ")[3])
if cash then
player.leaderstats.Cash.Value = cash
end
end
end)