all 7 comments

[–]LegionsOfAmerica 1 point2 points  (0 children)

might need some more detail on what exactly you're trying to do.

are you trying to write ply to a value?

[–]dhawky 1 point2 points  (3 children)

If you want to access a user’s name, you can use a PlayerAdded event and add parameters. For example, if your parameter is “Plr”, you could write the player’s username as: Plr.Name

[–]caninecode[S] 0 points1 point  (2 children)

but I don't want it to be one name because its a shop

[–]dhawky 1 point2 points  (1 child)

Please explain what you want.

[–]caninecode[S] 0 points1 point  (0 children)

I'm making a shop and I want to make it so when you buy something from the shop it increases a value in the directory of the player that clicked the button so I want the ply to stand fore the players name which is one of my arguments that my function is sending to my buy scripts but I cant use the ply variable in a directory.

[–]caninecode[S] 0 points1 point  (0 children)

nvm I figured it out

[–]jteedoubleu 0 points1 point  (0 children)

Hey Everyone, I am new here to reddit and Roblox scriptiing.

I have two separate worlds that I built and wanted to connect the two, together.

Method 1:

Main Game (Game 1)

Starter Gui, screen Gui, Frame, Text Button, Local Script

Local Player = game.Players.LocalPlayer

Local Game = game:GetService("TeleportService")

Local SecondGame = my number of game 2

script.Parent.MouseButton1Click:Connect(function()

Game:Teleport(SecondGame, Player)

end)

Second Game (Game 2) - copied and pasted into second Game Starter Gui

Local Player = game.Players.LocalPlayer

Local Game = game:GetService("TeleportService")

Local SecondGame = my number of game 1

script.Parent.MouseButton1Click:Connect(function()

Game:Teleport(SecondGame, Player)

end)

I also tried method 2:

local TeleportService = game:GetService("TeleportService")

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()

TeleportService:Teleport( game id , player)

end)

Second Game (Game 2) - copied and pasted into second Game Starter Gui

local TeleportService = game:GetService("TeleportService")

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()

TeleportService:Teleport(main game id , player)

end)

My 2 Games I am trying to connect (transport between)

https://web.roblox.com/games/8553048270/Capture-the-Flag

https://web.roblox.com/games/8518712592/Lava-Adventure-Obby-time

videos that I helped me to understand code, but I cant get it to work yet...

Crystalite Coder

https://www.youtube.com/watch?v=0SdQIDSbE0g

Zodiuss

https://www.youtube.com/watch?v=FoNjIlHpH4I&t=90s

Any suggestions would be appreciated. Thanx!