Why does my script that opperate local parts in a startergui. What is wrong with this function touched script? Local script in playergui
wait() cam = workspace.CurrentCamera mouse = game.Players.LocalPlayer:GetMouse() player = game.Players.LocalPlayer if player.leaderstats.Key.Value < 1 then script.ACA:Clone().Parent = cam end ------------------------------ from here -------------------- game.workspace.CurrentCamera.ACA.ABA.Touched:connect(function(part) if part.Parent and player.Character(part.Parent) then game.Lighting.Question01:Clone().Parent = player.PlayerGui end end)
thank you
You are using 'player(part.Parent)' - which you are checking if the touching object was the player and not the players character.
Change it to player.Character(part.Parent)