I’ve just finished creating the loading screen for my game and wanted to make it so when a player presses the play button, they get teleported to a certain part. To hide the player while they’re loading, I made them invisible, non collidable, and anchored in the air. When the button is pressed, they will get teleported to the part and become visible and their HumanoidRootPart will become unanchored, allowing them to move.
All of this works except for one aspect; the player’s HumanoidRootPart doesn’t get unanchored. Here’s the weird part, the player’s HumanoidRootPart gets unanchored on the server but not on the client. I thought what happened on the server got replicated to all clients, where in this circumstance this doesn’t seem to be the case.
Here’s my code:
Part of local script that fires the remote event
button.MouseButton1Click:Connect(function() if clicked == false then clicked = true button.HoverScript.Disabled = true button.Image = "rbxassetid://5013062082" for i = 0, 1, 0.1 do background.BackgroundTransparency = i logo.ImageTransparency = i button.ImageTransparency = i wait() end event:FireServer(player) screen:Destroy() end end)
Server script that teleports the player to the part
local event = game.ReplicatedStorage:WaitForChild("FinishedLoading") local spawnPart = workspace:WaitForChild("Spawn1") event.OnServerEvent:Connect(function(player) local character = player.Character local HRP = character.HumanoidRootPart HRP.CFrame = spawnPart.CFrame * CFrame.new(0, 5, 0) HRP.Anchored = false for i, v in pairs(character:GetChildren()) do if v:IsA("MeshPart") and v ~= HRP or v:IsA("Part") and v~= HRP then v.Transparency = 0 end end end)
If you know what the issue is, please let me know!