Tp position stuff

Screenshot 2024-08-20 020010
WHAAAA.wmv (3.2 MB)
i think i found new glitch lol, btw it is a local script in starterplayerscripts that gets that value and teleport to the part that have the same name as value

so basically it found the part but cant teleport player

Do not tp the player on the client, do it on the server. This is to stop exploiters from manipulating the code and also replicate the changes to all clients
Here is the updated code:

local tp = workspace.P_TPER.TP
tp.Touched:Connect(function(hit)
   if hit.Parent:FindFirstChild('Humanoid') then
      local player = game.Players:GetPlayerFromCharacter(hit.Parent)
      hit.Parent.HumanoidRootPart.CFrame = workspace[player.leadersats.Platform.Value].CFrame
   end
end)
1 Like

so is this a script or local script?

Server script. This one is in ServerScriptService

the script u give me isnt working

Are there any errors? What does it say? I edited the script to comply with your local one

ok, i fixed u just spelled wrong i thing

but i got another little change

can u tp the player just a little bit up the block cuz it is stuck

look at it
robloxapp-20240820-0217351.wmv (1.2 MB)

Easy fix

local tp = workspace.P_TPER.TP
tp.Touched:Connect(function(hit)
   if hit.Parent:FindFirstChild('Humanoid') then
      local player = game.Players:GetPlayerFromCharacter(hit.Parent)
      hit.Parent.HumanoidRootPart.CFrame = workspace[player.leadersats.Platform.Value].CFrame + Vector3.new(0,5,0)
   end
end)

What I am doing on the tp line is adding 5 studs to the new position of the character

thanks bro, i need to put text for posting

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.