Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Make sure you have the model 'Map', With your map inside
- -- Made my Sc4pterR0bl0x
- local Map = game.Workspace.Map:GetChildren()
- script.Parent.MouseButton1Click:Connect(function()
- -- create a sound
- local sound = Instance.new("Sound", game.Workspace)
- sound.SoundId = "rbxassetid://1878443849"
- if not sound.IsLoaded then
- sound.Loaded:wait()
- end
- -- listen for events
- sound.Played:Connect(function(soundId)
- print("Sound.Played event")
- end)
- sound.Paused:Connect(function(soundId)
- print("Sound.Paused event")
- end)
- sound.Resumed:Connect(function(soundId)
- print("Sound.Resumed event")
- end)
- sound.Stopped:Connect(function(soundId)
- print("Sound.Stopped event")
- end)
- sound:Play()
- print("play", sound.Playing, sound.TimePosition) -- play true 0
- for i, v in pairs(Map) do
- game.Workspace.Gravity = 10
- v.Anchored = false
- game.Workspace.Gravity = 30
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment