You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m making a shop for my game -
What is the issue? Include screenshots / videos if possible!
The values don’t change. I tried doing it on the localscript and it only changed on the client but not the server, then I tried on the server script and it doesn’t even change at all -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked at every similar topic and it seems to work fine for them so I don’t know the problem.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Localscript:
local leaderstats = game:GetService("Players").LocalPlayer:WaitForChild("leaderstats")
local Currency = leaderstats:FindFirstChild("Noobcoins") -- Change the "YourCurrency" with the currency you made! In our case is Money
local dude = game.Players.LocalPlayer
local char = dude.Character
script.Parent.Activated:Connect(function()
if Currency.value>9 and workspace.Allies.Value<60 then
dude.leaderstats.Noobcoins.Value = dude.leaderstats.Noobcoins.Value - 10
script.Summon:FireServer(dude,10)
elseif workspace.Allies.Value == 60 then
script.Parent.Parent.Parent.NoWarning:Play()
script.Parent.Parent.Parent.Frame.Warning.Visible = true
wait(2)
script.Parent.Parent.Parent.Frame.Warning.Visible = false
end
end)
The script inside the Summon remote event:
local char = game.ServerStorage.AntiNooby.Noob
script.Parent.OnServerEvent:Connect(function(player,cost)
local coins = player.leaderstats.Noobcoins.Value
coins = coins - cost
workspace.Allies.Value = workspace.Allies.Value + 1
local copy = char:Clone()
copy.Parent = workspace
copy:MoveTo(Vector3.new(math.random(-210,700), 80, math.random(-281,281)))
end)
I need an answer fast because I want to release this update before halloween.
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.