Tell me if there is something you want to be fixed.
Wow! Thanks for the scripts. Iâm fixing the teleport thing and optimizing it so the names of everything woroks. Iâll get back to you. Thanks again!
Sorry, itâs a bit much to take in. Am I meant to create the teleportedstage value inside the player when they join?
Yes, just like I said
I donât understand
local TeleportedStage = Instance.new("IntValue")
TeleportedStage.Name = "TeleportedStage"
TeleportedStage.Parent = player
TeleportedStage.Value = "0"
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == player.TeleportedStage.Value + 1 then
player.TeleportedStage.Value = player.TeleportedStage.Value + 1
end
end
end)
When I reload, it still tps me to my stage value. Also, when I use the right and left arrows, the number at the top doesnât change.
When I said use the TeleportedStage value, I was talking about the script where you are teleporting character to stage when player respawn. As for the number, I updated the local script.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Stage = Player:WaitForChild("leaderstats"):WaitForChild("Stage")
local TeleportedStage = Player:WaitForChild("TeleportedStage")
local Remote = ReplicatedStorage:WaitForChild("StageTransfer")
num.Text = TeleportedStage.Value
num.FocusLost:Connect(function()
if tonumber(num.Text) > Stage.Value then return end
Remote:FireServer(tonumber(num.Text))
end)
right.MouseButton1Click:Connect(function()
Remote:FireServer("right")
end)
left.MouseButton1Click:Connect(function()
Remote:FireServer("left")
end)
num:GetPropertyChangedSignal("Text"):Connect(function()
num.Text = num.Text:gsub("%D+", ""):sub(1, 3)
end)
TeleportedStage:GetPropertyChangedSignal("Value"):Connect(function()
num.Text = TeleportedStage.Value
end)
That is the script Iâm pretty sure. It activates when the playerâs character loads. Also, thank you for the updated script.
Also, one more thing. When you join, it doesnât show your stage. I tried adding something that fixes that, but it just didnât let me click the arrows or change num.
Try again with the new script, I edited it 5 seconds after I replied and added a line that should fix that.
The second script in your reply is for checkpoints, probably.
TeleportedStage:GetPropertyChangedSignal(âValueâ):Connect(function()
num.Text = TeleportedStage.Value
end)
It doesnât work for some reason assuming this is the line you meant.
I meant this line at the beginning of the script.
num.Text = TeleportedStage.Value
What do you mean? (characters)
What this script does? I think its for checkpoints but it doesnt look very good.
I adjusted all of the text to teleportedstage but it still teleports you to stage when you die.
You shouldâve not done that. Only replace Stage to TeleportedStage in the script where you teleport character to checkpoint on respawn.
Thatâs what I did, though. (chars)
Can you show me that script then? Also you said you replaced every Stage to TeleportedStage
local checkpoints = workspace:WaitForChild("Checkpoints")
local coinremote = game.ReplicatedStorage:WaitForChild("CoinGet")
local ms = game:GetService("MarketplaceService")
local vip = 25751808
local mvp = 25751816
local dc = 25751830
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = "0"
coins.Parent = leaderstats
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = "0"
stage.Parent = leaderstats
local prestige = Instance.new("IntValue")
prestige.Name = "Prestige"
prestige.Value = "0"
prestige.Parent = leaderstats
local effectvalue = Instance.new("NumberValue")
effectvalue.Name = "efftime"
effectvalue.Parent = player
wait()
local TeleportedStage = Instance.new("IntValue")
TeleportedStage.Name = "TeleportedStage"
TeleportedStage.Parent = player
TeleportedStage.Value = stage.Value
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
wait()
char:MoveTo(checkpoints[stage.Value].Position)
hum.Touched:Connect(function(hit)
if hit.Parent == checkpoints then
if tonumber(hit.Name) == player.TeleportedStage.Value + 1 then
player.TeleportedStage.Value = player.TeleportedStage.Value + 1
if not ms:UserOwnsGamePassAsync(player.UserId,vip) and not ms:UserOwnsGamePassAsync(player.UserId,mvp) and not ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 5 -- none
elseif ms:UserOwnsGamePassAsync(player.UserId,vip) and not ms:UserOwnsGamePassAsync(player.UserId,mvp) and not ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 6 -- vip
elseif not ms:UserOwnsGamePassAsync(player.UserId,vip) and not ms:UserOwnsGamePassAsync(player.UserId,mvp) and ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 10 -- dc
elseif not ms:UserOwnsGamePassAsync(player.UserId,vip) and ms:UserOwnsGamePassAsync(player.UserId,mvp) and not ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 7 -- mvp
elseif ms:UserOwnsGamePassAsync(player.UserId,vip) and ms:UserOwnsGamePassAsync(player.UserId,mvp) and not ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 7 -- vip,mvp
elseif ms:UserOwnsGamePassAsync(player.UserId,vip) and ms:UserOwnsGamePassAsync(player.UserId,mvp) and ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 10 -- vip,mvp,dc
elseif not ms:UserOwnsGamePassAsync(player.UserId,vip) and ms:UserOwnsGamePassAsync(player.UserId,mvp) and ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 10 -- mvp,dc
elseif ms:UserOwnsGamePassAsync(player.UserId,vip) and not ms:UserOwnsGamePassAsync(player.UserId,mvp) and ms:UserOwnsGamePassAsync(player.UserId,dc) then
coins.Value = coins.Value + 10 -- vip,dc
end
coinremote:FireAllClients()
end
end
end)
end)
end)
Replace this with
char:MoveTo(checkpoints[TeleportedStage.Value].Position)
Thats the only thing you should have changed.
Also your script is just as awful as the first script.