You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Im making a story mode GUI where the stages get harder so giving a player a number value to enable a script in the teleported place to be triggered. -
What is the issue? Include screenshots / videos if possible!
My teleport script from my lobby is a local script so the StageSelect Value isnt regisered on the server so when the player teleports into the place the StageSelect value is still 0. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive looked online for tutorials on making a story GUI where you can select stages and cant find any. Anyone know of one?
Or how can i make my StageSelect value be registered in my leaderstats in my datastore? I have read about remote events etc but not really sure how to apply it in this case.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- This is an example Lua code block
local teleportGui = script.Parent
local Stage1 = teleportGui.Frame.Frame.Stage1.TextButton
local Stage2 = teleportGui.Frame.Frame.Stage2.TextButton
local teleportService = game:GetService("TeleportService")
local player = game.Players.LocalPlayer
local placeID = 9566395887
Stage1.MouseButton1Up:Connect(function()
player.leaderstats.StageSelect.Value = 1.1
wait(2)
teleportService:Teleport(placeID, player)
end)
Stage2.MouseButton1Up:Connect(function()
player.leaderstats.StageSelect.Value = 1.2
wait(2)
teleportService:Teleport(placeID, player)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.