Script only works in studio? mouse.KeyDown function.
Asked by
Qorm 100
10 years ago
Not too sure what's going on. The script is Local and I've also tried regular.
01 | player = script.Parent.Parent.Parent.Parent |
02 | mouse = player:GetMouse() |
04 | text = script.Parent.text |
05 | text.Text = ( "Welcome to " ..script.Parent.Parent.Name) |
07 | mouse.KeyDown:connect( function (key) |
Ok. I know this is my second question yet in 24 hours, but this frustrates me. I can't figure out why it works for other people but not me?
EDIT: So apparently everything else works except the starting GUI. Here's the part of the script that DOESN'T load:
01 | flagclone = game.ServerStorage.flag |
02 | for o,p in pairs (flagclone:getChildren()) do |
04 | p.Parent = game.Workspace |
06 | p.Position = player.Character.Head.Position |
09 | print ( "pressed (" ..key.. ")" ) |
11 | frame.BackgroundTransparency = i |
12 | text.TextTransparency = i |
17 | text.TextTransparency = i |
21 | text.Text = ( "The current Version is: " ..script.Parent.Parent.version.Value.. "!" ) |
23 | text.TextTransparency = i |
28 | text.TextTransparency = i |
34 | text.TextTransparency = i |
39 | frame.BackgroundTransparency = i |
40 | text.TextTransparency = i |
-this works in studio, not in online mode.