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

local player = game.Players.LocalPlayer
local tool = game.ReplicatedStorage.ShopTools.AK47
local cloneTool = tool:Clone()
script.Parent.MouseButton1Click:Connect(function(click)
  if player.leaderstats.Francs.Value >= 10 then
     player.leaderstats.Francs.Value = player.leaderstats.Francs.Value - 10
    end
    cloneTool.Parent = player.Backpack
end)

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