Hello! So I need help with something, I made a script to give my player a tool and it all works fine (it’s even in his backpack). But for some reason it doesn’t appear in the HotBar
Any tips or ideas on how to fix something like this?
Hello! So I need help with something, I made a script to give my player a tool and it all works fine (it’s even in his backpack). But for some reason it doesn’t appear in the HotBar
Any tips or ideas on how to fix something like this?
Did you include a Handle with the tool?
Yeah the tool has a handle included
Could we see the script then if possible? It’d help
local function GivePlayerWeapon(plr)
local function FindHumanWeapon()
local LightFolder = game.ServerStorage.PlayerData:FindFirstChild(plr.UserId)
local light = LightFolder.Weapons.Equipped.Value
return light
end
if game.ServerStorage.GameInProgress.Value == true then
local lightgear = FindHumanWeapon()
local lightlol = game.ServerStorage.Tools:FindFirstChild(lightgear)
local lightobj = lightlol:Clone()
lightobj.Parent = plr.Backpack
end
end
Can you show a video or clip of this happening? Can’t find any issues with your code.
It might be either
A: A strange bug or
B: Changed the CoreGui to the Backpack?
The only issue I see is equipped.Value as I’m pretty sure that doesn’t exist, so unless equipped is an bool value that won’t work
If it is then I would recommend a findfirstchild so it doesn’t get confused
Yeah I think it might be a strange glitch… I don’t know any ways to fix it
You could try adding print statements to see if the variables are valid? And I’m guessing that local light = LightFolder.Weapons.Equipped.Value
is a BoolValue?