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

I made this clicking script but it doesn't work?

I wanted the script to: when you click a player there gui get's disabled and there torso turns read

--Made by Jxonathan
Player = game.Players.LocalPlayer

Character = Player.Character or Player.Character:wait()

if Player.Character ~= nil then
	local ClickDetector = Instance.new("ClickDetector")
	ClickDetector.Parent = Player.Character
end

Player.Character.ClickDetector.MouseClick:Connect(function()
	Player.PlayerGui.ScreenGui.Enabled = false
Player.Character.Torso.BrickColor = BrickColor.new("Electric Blue")
end)

1 comment

0

Electrib blue***

1 answer

You're setting ClickDetector in a Model. It should be set in a part for it to work.

Also instead of refering it again with Player.Character.ClickDetector when there's already a variable set for it. Just use the variable ClickDetector instead of Player.Character.ClickDetector.

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