So I have a tool that gives the player an keystroke class , and i had a problem with the gui that it wont appear after the player respawns, i have solved that problem but now all the scripts run without me even choosing a class(which would give the player a tool WHICH would load the script. the script that gives the player the tool(LocalScript)
function onClicked()
script.Parent.Parent.Parent:Destroy()
end
script.Parent.MouseButton1Click:connect(onClicked)
local p = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
local tool = script.Parent.yukio:Clone()
tool.Parent = p.Backpack
end)
AND the script that loads in the gui ( Menu is the name of the gui)
local Menu = script.Menu
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
local MenuClone = Menu:Clone()
MenuClone.Parent = player.PlayerGui
end)
end)
I had an old script for the gui which was working perfectly,only that it wouldnt appear after the player respawned:
Menu = script.Menu
game.Players.PlayerAdded:connect(function(player)
local MenuClone = Menu:Clone()
MenuClone.Parent = player.PlayerGui
end)
I have also seen that when i removed player.CharacterAdded:Connect(function()... end) the scripts and gui would all work again but still wont appear after the player respawned

2 comments
just put the menu in startergui.
Tried it, still dosent work :(