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

Weapon goes on the inentitory but it doesn't load?

Asked by
Borrahh 265 Moderation Voter
4 years ago
Edited 4 years ago

If I put the weapon on StarterPack, it works fine, but with this script, it doesn't load, it goes on my character but it doesn't work, its like invisible

1local player = game.Players.LocalPlayer
2local tool = game.ReplicatedStorage.ShopTools.AK47
3local cloneTool = tool:Clone()
4script.Parent.MouseButton1Click:Connect(function(click)
5  if player.leaderstats.Francs.Value >= 10 then
6     player.leaderstats.Francs.Value = player.leaderstats.Francs.Value - 10
7    end
8    cloneTool.Parent = player.Backpack
9end)

1 answer

Log in to vote
3
Answered by 4 years ago

if you change something with a local script it only changes for the client, not the whole server, so whenever you are changing a value in the server or creating a game object it needs to be done in a normal script if you want the server to recognize it.

0
Thanks! Borrahh 265 — 4y
Ad

Answer this question