Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Charecter Invailded

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.