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

Can someone tell me what's wrong with this GUI script?

Asked by 8 years ago

I'm trying to make a book that when equipped and the clicked, makes a GUI that has writing In it. I get no errors, but nothing happens.

local tool = script.Parent
local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
local StarterGui = game.StarterGui



tool.Equipped:connect(function(click)
    mouse.Button1Down:connect(function()
        local spell = Instance.new("ScreenGui")
        spell.Parent = StarterGui
        local spellb = Instance.new("TextLabel")
        spellb.Parent = spell
        spellb.Position = UDim2.new(0, 150 ,0 ,50)
        spellb.Size = UDim2.new(0, 150, 0, 25)
        spellb.Text = "Work In Progress"
        spellb.BackgroundColor3 = BrickColor.White().Color
    end)
    end) 

1 answer

Log in to vote
0
Answered by 8 years ago
local StarterGui = Player.PlayerGui

No idea why you would put it in startergui, but this should work im on my phone atm so if it doesnt just say something

Ad

Answer this question