Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make my script properly find the players mouse? player:GetMouse() [closed]

Asked by 6 years ago
01player = script.Parent.Parent.Parent
02mouse = player:GetMouse()
03invBox = game.StarterGui.ScreenGui.Frame
04local open = false
05 
06function inv(key)
07    key = key:lower()
08 
09    if key == "p" then
10        if open then
11        player.PlayerGui.ScreenGui.Frame.Visible = false -- You can change "Frame" or "ScreenGui" to your Gui's name(s)
12        open = true
13        open = false
14        return
15        end
View all 24 lines...

If I were to put the script into PlayerScripts then it would work just fine

if I make player = script.Parent.Parent

Closed as Not Constructive by TheeDeathCaster

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?