Im trying to make a custom character creation set where i have the player click on a button and it would teleport them to a certain position on the map. I understand how to do this like
script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.FireClick.OnServerEvent:Connect(function(plr) local char = game.Workspace:FindFirstChild(plr.Name) wait() char.HumanoidRootPart.Position = Vector3.new(-7889.251, -179.843, 452.37) end) end)
This is correct and all but i only want the player who clicked to be visible when teleported. so if others teleport they are the only ones visible aswell. Something along the lines of that. Thank you so much and i understand if this is hard to read. Please let me know if you need any other info to help! -TeaWithMee
For your Answer you try to it:
script.Parent.MouseButton1Click:Connect(function() local remoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("Teleport") remoteEvent:FireServer() end)
second script code : put this other code to Script:
local remoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("Teleport") local teleportBlock = workspace:FindFirstChild("TeleportPoint") remoteEvent.OnServerEvent:Connect(function(player) workspace[player.Name].HumanoidRootPart.CFrame = teleportBlock.CFrame end)
make sure the second script to put in ServerScriptService.
And Make block in Workspace and put name TeleportPoint.
Just put this block in the space you want to place and put it in transparency = 1
If that helped you, thank you, if it didn't help, I'm sorry.