RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"the humanoid rootpart isnt getting anchored,"
-- That's correct. The rootPart is not getting anchored because the PlayerAdded event is fired before the player's character is loaded in the game. Therefore, the humanoid and rootPart do not exist yet when the script tries to access them. Here's a corrected version of the script. local tweenService = game:GetService('TweenService') local gui1 = script.Parent.Menu.GameName local tweenInfo1 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) local goal1 = {Position = UDim2.new(1, 0, 1, 0)} local tween1 = tweenService:Create(gui1, tweenInfo1, goal1) local gui = script.Parent.Menu.Play local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) local goal = {Position = UDim2.new(1, 0, 1, 0)} local tween = tweenService:Create(gui, tweenInfo, goal) local blur = Instance.new("BlurEffect", game.Lighting) blur.Size = 15 local function start() tween:Play() tween1:Play() blur:Destroy() end gui.MouseButton1Click:Connect(start) game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild('Humanoid') local rootPart = humanoid.RootPart rootPart.Anchored = true end) end)