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)
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.