Gui Button Teleporting issue

Uh can you send us a video of you trying to tp, and with the QT folder on, if it just disappears then yeah fix one of your scripts

1 Like

Alright I will do that and since i cant just say yes due to character minimum, yes the part is anchored

I dont know whats happening but it says uploading 100% then it says theres an error (i tried 5 times) but i had it open and none of the times was MCave1 removed, it just never loaded in. As i mentioned previously FindFirstChild made the part load in somehow. So a script isnt removing it, its just not loading in for some reason.

What is the thing inside MCave1?

2 decals and a particle emitter. So i found out that flying near it and it loading in was enough, the problem is running from one side of the map to another is very tedious, so i want it to load in without having to go from one side to another.

Basically what im saying is, is there a way i could make the part load in?

Your part is already loaded since you put it on the explorer

you know what, just go to command bar and type this

part = workspace.MCave1

if there is error saying like “not valid member” means it isnt in u can just see it or smt(it happens to some of my tools where i deleted it but i can still see it but it isnt there)

Well thats strange since It only is added into the workspace when in close proximity or by using findfirstchild. I have streaming enabled, does that effect parts loading in when very far away?

" Faster Load Times — Players can start playing as soon as part of the world is loaded while more of the world loads in the background."-- a reference for what streaming enabled does Content Streaming | Roblox Creator Documentation

turn it off

It doesnt detect in when far away but once i fly over there it detects it and the tp works, but as i said before going from one side of the map to the other takes a very long time, meaning it would be boring if the only way to tp to an area was to go over there every time.

i dont want to be annoying but my game itself is near 1400-1500 memory usage so loading all of the content at once would be taxing to mobile, console, and most pc users. Is there a way to force the part to load in or no?

So i made the same folders and i put the same script on a textbutton and it worked for me.

local part = game.Workspace.Environments.QT:WaitForChild("Part")
local player = game.Players.LocalPlayer
local Character = player.Character
local Hum = Character:WaitForChild("HumanoidRootPart")

script.Parent.MouseButton1Click:Connect(function()
    Hum.CFrame = part.CFrame + Vector3.new(0,10,0)
end)

" If you move a player’s character by setting its CFrame , doing so from a server-side Script in favor of a LocalScript will let the server more quickly load data around the character’s new location."-- another reference from if you turn streaming enabled on

The script works lets just get that clear, but the part that im teleporting to is suuuper far away, meaning it isnt loaded in. Since findfirstchild worked before (in loading the part, the script itself didnt work though) could there be a way to use findfirstchild in my current script?

Or do it in server sided

-- localscript
local part = game.Workspace.Environments.QT:WaitForChild("Part")
local player = game.Players.LocalPlayer
local Character = player.Character
local Hum = Character:WaitForChild("HumanoidRootPart")

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.RemoteEvent:FireServer()
end)

-- server script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
part = workspace.Environment.QT:WaitForChild("MCave1")
player.Character.HumanoidRootPart.CFrame = part.CFrame - Vector3.new(0,0,-4)

end)
1 Like

Alright thank you for the help so far, ill try it right now.

the script should work anyway

GOT EM
I TRIED IT WITH STREAMING ENABLED ON “attempt to index nil with ‘CFrame’”

It should u are completely right, but it isnt probably due to me having a huge game already and it being far along with streaming enabled turned on.