Hello!
I never coded in Lua before but I still want to develop a Tower Defense type of game with the help of tutorials (GnomeCode)
In my game, you can open a GUI to create a party. Once created, you have to select a map by clicking the appropriate button with the map's name, this is where my problem appears.
I created an IntVariable inside ReplicatedStorage storing the placeId of the selected map. Once you clicked on the desired map button, the value of my IntVariable should change into the placeId of the map.
Here's the code:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local value = game.ReplicatedStorage.lol
script.Parent.MouseButton1Click:Connect(function() value.value = 8833962147 end)
lol is the name of my IntVariable
Once selected, the "placeId" inside my party system script should take the value of lol.
The code from the party system script:
local tps = game:GetService("TeleportService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local placeId = game.ReplicatedStorage.lol.Value
then TeleportAsync should teleport to "placeId":
tps:TeleportAsync(placeId, playersToTP, tpOptions)
but in the end It says " Invalid placeId"
Could anyone help me out on this?
~ Jupitrion
