Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i get an weapon after my player teleported to another map?

Asked by
DashDQ 17
4 years ago

Example: I have an round system or an timer.After the intermission loading bar screen gui ends after 20 seconds or less.My player teleports from the lobby to the GameArea.How can i put an weapon after he gets in the GameArea?

Can someone link me an youtube video or something please?

2 answers

Log in to vote
0
Answered by 4 years ago

I thought of sending data with TeleportService but that doesnt support objects, you are then forced to add a script which gives you the weapon when you have entered the map. I am assuming you want the player to get the weapon immediately with no interference whatsoever.

Heres a script i made, put it in serverscriptservice:

local weapon = game.ReplicatedStorage.CHANGETOWEAPON

game.Players.PlayerAdded:Connect(function(player()
    local clone = weapon:Clone()

    clone.Parent = player.Backpack
end)

if you are not looking for this type of script then leave a comment.

0
How can i choose the weapon that i want with this script? DashDQ 17 — 4y
0
change the variable at the top, change the whole location to where ur weapon is ChrisTheRobloxPlayYT 256 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Using the TeleportService, you can send data along with a player when you teleport them to a different place. Here is the API page for more details.

https://developer.roblox.com/en-us/api-reference/class/TeleportService

Answer this question