--// Client local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera local hum = Character:WaitForChild("Humanoid") local tweenService = game:GetService("TweenService") local camOld = game.Workspace.CurrentCamera.CFrame local theme = script.Parent.Theme --// GUIs local PlayButton = script.Parent.Play

--// FUNCTIONs function tweenCamera(tweenTime) tweenService:Create(Camera,TweenInfo.new(tweenTime,Enum.EasingStyle.Linear),{CFrame = camOld}):Play() wait() Camera.CameraType = Enum.CameraType.Custom end

--// Main theme:Play() repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame script.Parent.Enabled = true Character.HumanoidRootPart.Anchored = true Instance.new("ForceField",Character)

PlayButton.MouseButton1Click:Connect(function() tweenService:Create(theme,TweenInfo.new(1),{Volume = 0}):Play() script.Parent.Bar1:TweenPosition(UDim2.new(0, 0,-0.35, 0), "Out", 2) script.Parent.Info:TweenPosition(UDim2.new(0.055, 0,-0.65, 0), "Out", 2) script.Parent.Bar2:TweenPosition(UDim2.new(0, 0,1, 0), "Out", 2) tweenCamera(1) end)

this is a main menu... when i click play it tweens to players cam... buit when i reset and then click play again it tweens to where i died... any1 know how to fix? or know a easier way to tween to player cam?

5 comments

0

try to set "ScreenGui.ResetOnSpawn = false" do it manually not with a scritp

0

nvm dont do that

0

then whjat do i do then?

0

i think you should look at this