Local script in screenGui. The script does everything EXCEPT clones the GUIs. What am I doing wrong? It removes the entire GUI like it should, but it's like it just completely looks over the cloning and does nothing with it.
repeat wait() until game.Players.LocalPlayer.Character ~= nil player = game.Players.LocalPlayer script.Parent.Play.MouseButton1Down:Connect(function() script.Parent.Play:TweenPosition(UDim2.new(-2, 0, .423, 0, "Out", "Quad", 1, true)) script.Parent.Help:TweenPosition(UDim2.new(-2, 0, .6, 0, "Out", "Quad", 1, true)) script.Parent.Credits:TweenPosition(UDim2.new(-2, 0, .776, 0, "Out", "Quad", 1, true)) player.Character.UpperTorso.CFrame = CFrame.new(Vector3.new(37.714, 7.159, 168.844)) wait(.1) local Ncam = workspace.Camera Ncam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid Ncam.CameraType = "Custom" wait(.5) local t = game.ReplicatedStorage.PlayerInterface:Clone(player.PlayerGui) local debugger = player.PlayerGui:FindFirstChild('Debug') debugger.Interface.Value = 'HasInterface' wait(1) script.Parent:remove() --end end)
Setting the parent cannot be done within the parentheses as a parameter, though is actually meant to be done by writing .Parent
after the parentheses instead. This shouldn't be done in the form you've written it though as you've created this Clone to be returned to a variable for reference; this measure cannot be done if this is the scenario.
Simply just call the same line without the variable declaration or drop a line to set the Parent instead.
script.Part:Clone().Parent = workspace.