Well I have this script that transports me between the games in my universe when I step on it and it uses this script
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game:GetService("TeleportService"):Teleport(3675788054, player)
end
end
script.Parent.Touched:connect(onTouched)
but I want it to teleport my items, leaderboard, currency, etc with me. I made this modified script but it doesn't work.
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game:GetService("TeleportService"):Teleport(3675788054,game.Players.LocalPlayer,Player.leaderstats.Cash.Value))
end
end
script.Parent.Touched:connect(onTouched)
How do I accomplish this/fix my script?
