In todays video I show you how to make a Teleport Button, once clicked the player is teleported to a set location. Hope you enjoyed the video, Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to message me on Discord or in the comments and Ill help you out!
Script 1
local rs = game:GetService("ReplicatedStorage")
local REs = rs.REs
local teleportEvent = REs.Teleport
script.Parent.MouseButton1Click:Connect(function(plr)
teleportEvent:FireServer(plr)
end)
Script 2
local rs = game:GetService("ReplicatedStorage")
local REs = rs.REs
local teleportEvent = REs.Teleport
local TeleportPart = workspace.TeleportPart
teleportEvent.OnServerEvent:Connect(function(plr)
local Player = workspace:FindFirstChild(plr.Name):WaitForChild("HumanoidRootPart")
Player.Position = TeleportPart.Position + Vector3.new(0,1,0)
end)
#coding #gaming #developer #scripting #lua #roblox #code #work #robloxstudio #robloxdeveloper #robloxdevelopment #development #luascript #games #game #create #sandbox #tutorial #tutorials #tutorialvideo #helping #learning #learn #learntocode2024 #learncoding #learncodingforbeginners
Негізгі бет How To Make A TELEPORT BUTTOM🛠️ Roblox Studio Tutorial (2024!)
Пікірлер: 2