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

Charecter Invailded

Asked by 10 years ago
function yes(Player)
    local h = script.Parent.Parent
    h.Visible = false
    local Player = game.Players.LocalPlayer
    local Charecter = Player.Charecter
    Charecter.Torso.Anchored = true
    script.Parent.Parent.Parent.Yes.Visible = true
    local rob = script.Parent.Parent.Parent.RobbingPresent
    rob.Script.Disabled = false
end

script.Parent.MouseButton1Down:connect(yes)

09:11:46.116 - Charecter is not a valid member of Player 09:11:46.117 - Script 'Players.Player1.PlayerGui.Robbing.Want.Yes.LocalScript', Line 5 09:11:46.118 - stack end

1 answer

Log in to vote
2
Answered by 10 years ago

You have spelled Character wrong:

function yes(Player)
    local h = script.Parent.Parent
    h.Visible = false
    local Player = game.Players.LocalPlayer
    local Character = Player.Character
    Character.Torso.Anchored = true
    script.Parent.Parent.Parent.Yes.Visible = true
    local rob = script.Parent.Parent.Parent.RobbingPresent
    rob.Script.Disabled = false
end

script.Parent.MouseButton1Down:connect(yes)

Ad

Answer this question