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

RespawnGUI isn't working why? I have two scripts.

Asked by
Zequew 0 Donator
8 years ago
local plr = game.Players.LocalPlayer

repeat wait() until plr.Character

local open = true
local mouse = plr:GetMouse()
local groupid = 2830572

function FullName(name)
    for _,v in pairs(game.Players:GetPlayers()) do
        if v.Name:lower():match(name:lower()) then
            return v.Name
        --else
        --  return "Couldn't find player"
        end
    end
end

function IsWorker()
    if plr:GetRankInGroup(groupid) > 1 then
        return true
    else
        return false
    end
end

if IsWorker() == true then
    script.Parent.Frame.Visible = true
end

script.Parent.Frame.PlaceButton.MouseButton1Down:connect(function()
    local playaa = game.Players:FindFirstChild(FullName(script.Parent.Frame.CustomerBox.Text))
    if playaa ~= nil then
        game.Workspace.Respawn.Username.Value = playaa.Name
        game.Workspace.Respawn.Respawner.Value = plr.Name
        game.Workspace.Respawn.Value = true
    end
end)
local stop = false

script.Parent.Parent:TweenPosition(UDim2.new(1, 0, 1, -365), "Out", "Linear", 0.05, true)

script.Parent.MouseEnter:connect(function()
    if stop == false then
        stop = true
        script.Parent.Parent:TweenPosition(UDim2.new(1, -205, 1, -365), "Out", "Quad", 0.3, true)
        else
        script.Parent.Parent:TweenPosition(UDim2.new(1, 0, 1, -365), "Out", "Quad", 0.3, true)
        stop = false
    end
end)

So basically as you see here: http://prntscr.com/dq5k4t The scripts are not working no more.. I wanted it to be like where if people are in the Security group that would get the ability to have the RespawnGUI on their screen. But not it's not working! Why isn't it working no more?

0
qq Zequew 0 — 8y
0
It may be that if there was no name found, so for loop doesn't return a player, and since there isn't a fail-safe, that may be why; try adding 'return nil' after the for loop in your "FullName" function, b/c it's favored fail-safe. :) i.e. it'll tell line 33 that it returned nil, since the if statement only fires if the value is true, b/c in your current script, it returns nothing. Although, that' TheeDeathCaster 2368 — 8y
0
Ew tweening lol long functions Inpolite 44 — 7y

1 answer

Log in to vote
0
Answered by
Zequew 0 Donator
8 years ago

Anyone?

Ad

Answer this question