I have been working on this script, that gives btools when you click the button but it doesnt work and gives me an error before i even click anything (Unable to cast value to object), any help
This is the script.
playerPlayers = game.Players.LocalPlayer.Name
playerWorkspace = game.Workspace:GetFullName(playerPlayers)
player = game.Players.LocalPlayer
r = script.Parent
t = player.PlayerGui.AdminGui.Frame.NameSelect.Text
player2 = game.Players:GetPlayerFromCharacter(t)
player.PlayerGui.AdminGui.Frame.Btools.MouseButton1Click:Connect(function(p)
local e = game.Lighting["Building Tools"]:Clone()
e.Name = ("Btools")
e.Parent = player2.Backpack
end)

1 comment
Thank you so much! This worked, i have been working on this for a day now so i came here for help.