hey I am working on an adventure style parkour game and I am trying to make a skip stage button work with my team stage system see the photo if your confused does anyone know how I would do this? all the things I have tried failed thanks!!
Use this:
LocalScript
local button = --Put here your skip stage button
local remoteEvent = --Put here a RemoteEvent within ReplicatedStorage
button.Activated:Connect(function()
remoteEvent:FireServer()
end)
Script
local remoteEvent = --Put here a RemoteEvent within ReplicatedStorage
local teams = game:GetService("Teams"):GetChildren()
remoteEvent.OnServerEvent:Connect(function(player)
local stage = table.find(teams, player.Team)
player.Team = teams[stage + 1]
end)
Cool thanks where exactly am I supposed to put the script? I think I got an idea but just double checking
also right now all my check points are named Checkpoint 1, Checkpoint 2, ect do I need to change the names for the script to work?
If you want (or you can just use tags), I had to do that once when I decided everything should be put in one script :). Also, I suggest setting the player’s “RespawnLocation” to create checkpoints instead of creating lots of “Teams” because colors are limited :).
alright thanks I like the teams thing because it looks better in my opinion but it seems a lot harder to work with so maybe I will do that instead
I know this makes me seem like such I noob but what do you mean by tags?
I’ve never used tags before but I think some people use it to assign a “second name” to an object. This link will help you more than I can: CollectionService | Roblox Creator Documentation