So I'm making a tool giver gui, but I can't seem to find a way to locate the LocalPlayer in a server script. I've seen many people have this problem, but in different situations that don't match mines. The tutorials on YouTube also use LocalScripts, and as they do work, I'm pretty sure other players don't see the tools you are using. Here is my code:
script.Parent.MouseButton1Down:Connect(function()
local tool = game.Lighting.Tool:Clone()
tool.Parent = --???????
end)
I have read the Roblox Developer Hub article about GuiObjects and the MouseButton1Down event, but I can't seem to find the solution. Please help me, as this could help others in the future having this same problem.

3 comments
Try accessing the player from script.Parent.Parent and so on until u reach the player
don't use ""script..Parent..Parent"" Use ""script:FindFirstAncestorOfClass("Player")""
Yo thanks guys! It actually worked! :D