So I am learning some about scripting and I was trying to make a minigame just for fun and I tried alot of things and they all don't work can someone help me?
Starting = game.StarterGui.ScreenGui:GetChildren() for i, v in pairs (Starting) do v.Text = "Starting Game" --Changing the Text label to say starting game end player = game.Players.LocalPlayer pad = game.Workspace.Part function makeHumanoidRootPartMove() for i = 50, 2.6 do player.Character.HumanoidRootPart.CFrame = CFrame.new(player.CFrame.X + i, player.CFrame.Y + i, player.CFrame.Z) end end makeHumanoidRootPartMove()
Some beginners may find this to be a quick way to change a Gui for all players. Unfortunately, it's not that simple. StarterGui is basically what PlayerGui clones from when you respawn. That means, any changes you make to objects in StarterGui will not show until you respawn.
PlayerGui
.local player = game.Players.LocalPlayer -- Remember to use local variables! local playerGui = player:WaitForChild("PlayerGui") local Starting = playerGui:WaitForChild("ScreenGui"):GetChildren() local char = player.Character or player.CharacterAdded:Wait() for i, v in pairs(Starting) do v.Text = "Starting Game" end local pad = game.Workspace.Part local function makeHumanoidRootPartMove() for i = 50, 2.5, -.5 do -- count backwards with a negative number player.Character:SetPrimaryPartCFrame( CFrame.new( char:GetPrimaryPartCFrame().X + i, char:GetPrimaryPartCFrame().Y + i, char:GetPrimaryPartCFrame().Z ) ) end end makeHumanoidRootPartMove()