Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- — ontouch set spawn to here
- local datastoreservice = game:GetService("DataStoreService")
- local spawns = datastoreservice:GetDataStore("spawns")
- script.Parent.Touched:Connect(function(hit)
- local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
- if humanoid then
- local player1 = game.Players:GetPlayerFromCharacter(hit.Parent)
- spawns:SetAsync(player1.userId, script.Parent.CFrame * CFrame.new(0, 10, 0))
- -- printTable(player1.leaderstats:GetChildren())
- player1.leaderstats:WaitForChild("Stage").Value = script.Parent.Name
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement