This is the wrong category. Move this to #help-and-feedback:scripting-support.
Can we have a bit of code? At least the bit that registers the purchase and clones.
Are you sure that this is done on the server?
Does the tool have a Part called Handle?
Also, Does the tool have RequiredHandle enabled in its properties?
Can you post a chunk of code so we can see wheres the error?
local player = game:GetService("Players").LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if player.leaderstats.Money.Value > 500 then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 500
game.ReplicatedStorage.Notepad:Clone().Parent = player.Backpack
print("Purchased")
script.Parent.Parent.BUYSOUND:Play()
else
script.Parent.Text = "Not enough money!"
wait(0.6)
script.Parent.Text = "Notepad"
end
end)
i am moving the category so sorry!
edit: it changed by itself…?
yes they all have handle and requiredhandle on!
The problem here is that you are doing all of this in a local script. Use a remote event to check when the player wants to buy something and process the rest on the server.
so what would i do then? sorry im not very advanced
the tools work its just that they arent going to the players hand
Use Remote Events. 30 chars
Make a RemoteEvent in replicated storage and fire it from the local script, make a server script in server script service that listens to the remote event and does everything. to fire a remote event do RemoteEvent:FireServer() in the local script, then in a server script listen to it via RemoteEvent.OnServerEvent:Connect(function(plr)
Essentially you are cloning the tool locally so it only exists for the client. In order for it to work properly you have to make the server handle stuff that must be visible for everyone.
the RemoteEvent… could i change it to the remote event’s name? because i need 3 different items to give…
If you need 3 different items then you could send out the data as an argument. If a player has clicked on the first item then it would send out an argument named 1, for example.
how do i send out arguements?
Ok so, the player has clicked the first button, store that somewhere in a value and after that you can just do RemoteEvent:FireServer(choice)
On the server you would have to listen to the argument like that: RemoteEvent.OnServerEvent:Connect(function(plr,choice)
Anyway it is getting late for me so I will leave you to it. One last thing I can suggest you is to examine developer.roblox.com a little regarding RemoteEvents and overall the Server-Client structure.
Do you have the Backpack game object enabled. I had mines disabled and was freaking out.
Had it disabled in something like this:
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
Continuing the discussion from Tool not appearing after buying it:
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!
-
What is the issue? Include screenshots / videos if possible!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
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!
-- This is an example Lua code block
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.