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

Why is this not working please help?

Asked by
qwrn12 85
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
local player = game.Players.LocalPlayer
y = 1
x = game.Lighting["Baton"]:Clone(); 
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.E then 
        if y == 1 then
        player.Character.Humanoid:EquipTool(x)
        y = 2
        game.player.PlayerGui.InventoryGui.Frame.Frame.E.BorderColor3 = 13, 120, 177
        elseif y == 2 then
        player.Character.Humanoid:UnequipTools()
        y = 1
        end
    end 
end)

this my script the part that's not working is game.player.PlayerGui.InventoryGui.Frame.Frame.E.BorderColor3 = 13, 120, 177 its spost to make border color different

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

The first thing you did wrong on that line was write game.player instead of player. The second was trying to set one property to three separate numbers when it should be set to Color3.new(13/255,120/255,177/255).

0
thanks qwrn12 85 — 8y
0
nextime ill be more carful qwrn12 85 — 8y
Ad

Answer this question