Hello developers!
I have made a game ( that has. a custom reset animation )
Mobile players cannot move in my game.
1 Like
Not to sound salty, but fun fact, in order to help with your scripting, we kinda need to see your scripts man, so uh yeah
1 Like
script.Parent.Frame.Visible = true
local function cool ()-- song fade out.
for i = 0.05, 1, 0.02 do
wait(0.01)
script.Sound.PlaybackSpeed = i
end
end
local function vad ()-- song fade out.
for i = 1, 0.05, -0.02 do
wait(0.01)
script.Sound.PlaybackSpeed = i
end
end
script.Sound:Play()
cool()
script.Parent.Frame.TextButton.MouseButton1Down:Connect(function ()
vad()
script.Parent.Parent:Destroy()
end)
Script 1 ^^
local frame = script.Parent.Frame -- Finding the ! Frame / Gui !
local player = game.Players.LocalPlayer -- Taking the player gui.
local text = frame.TextLabel
local image = frame.ImageLabel
local image2 = frame.ImageLabel2
local button = frame.TextButton
local Event = game:GetService("ReplicatedStorage").respawn
local function FadeIn () -- gui fade in
for i = 1, 0, -0.2 do
wait(0.01)
script.Parent.Frame.BackgroundTransparency = i
end
end
local function buttonFadeIn2 () -- gui fade in
for i = 1, 0.36, -0.09 do
wait(0.01)
button.TextTransparency = i
end
end
local function buttonFadeIn () -- gui fade in
for i = 1, 0.8, -0.08 do
wait(0.01)
button.BackgroundTransparency = i
end
end
local function Fadeout ()-- Gui fade out
for i = 0, 1, 0.2 do
wait(0.01)
script.Parent.Frame.BackgroundTransparency = i
end
end
local function ButtonFadeout ()-- Gui fade out
for i = 0.8, 1, 0.05 do
wait(0.01)
button.BackgroundTransparency = i
end
end
local function ButtonFadeout2 ()-- Gui fade out
for i = 0.36, 1, 0.05 do
wait(0.01)
button.TextTransparency = i
end
end
local function tweenframe()
image:TweenPosition(UDim2.new(-0.111, 0,-0.45, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
end
local function tweenframe2()
image:TweenPosition(UDim2.new(-0.111, 0,-0.955, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
image2:TweenPosition(UDim2.new(-0.212, 0,-1.146, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
end
local function tweenframe3()
image2:TweenPosition(UDim2.new(-0.22, 0,-0.622, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
end
local function tweenframe4()
image2:TweenPosition(UDim2.new(-0.114, 0,-0.395, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
image:TweenPosition(UDim2.new(-0.221, 0,-0.597, 0), Enum.EasingDirection.Out , Enum.EasingStyle.Quint)
end
local function TextFadeout ()-- Text fade out!
for i = 0, 1, 0.08 do
wait(0.01)
text.TextTransparency = i
end
end
local function TextFadein () -- Text fade in
for i = 1, 0, -0.09 do
wait(0.01)
text.TextTransparency = i
end
end
local function songout () -- song fade in
for i = 1, 0, -0.2 do
wait(0.01)
script.Sound.Volume = i
script.Sound.sound2.Volume = i
script.Sound.Sound3.Volume = i
end
end
local function songin ()-- song fade out.
for i = 0, 1, 0.2 do
wait(0.01)
script.Sound.Volume = i
script.Sound.sound2.Volume = i
script.Sound.Sound3.Volume = i
end
end
local function sTART ()-- song fade out.
for i = 0.05, 1, 0.02 do
wait(0.01)
script.Sound.PlaybackSpeed = i
script.Sound.sound2.PlaybackSpeed = i
script.Sound.Sound3.PlaybackSpeed = i
end
end
local function BeEnd ()-- song fade out.
for i = 1, 0.05, -0.02 do
wait(0.01)
script.Sound.PlaybackSpeed = i
script.Sound.sound2.PlaybackSpeed = i
script.Sound.Sound3.PlaybackSpeed = i
end
end
print("GOOD!")
local deb = false
Event.OnClientEvent:Connect(function() -- seeing if he died.
print("GOOD")
frame.Visible = true
script.Parent.Frame.TextLabel.Text = "You died :)"
button.Visible = false
FadeIn()
script.Sound:Play()
script.Sound.sound2:Play()
script.Sound.Sound3:Play()
songin()
sTART()
wait(1)
tweenframe()
wait(0.1)
TextFadein()
task.wait(0.01)
button.Visible = true
buttonFadeIn2()
wait(0.01)
tweenframe3()
wait(0.002)
tweenframe4()
end)
button.MouseButton1Click:Connect(function ()
print("BAD")
if deb == false then
deb = true
script.Parent.Frame.TextLabel.Text = "HELP ME HELP ME HELP ME"
wait(0.01)
script.Parent.Frame.TextLabel.Text = "You diED HELP :)"
BeEnd()
songout()
tweenframe2()
TextFadeout()
Fadeout()-- Fading out the UI
script.Sound:Stop()
Event:FireServer()
deb = false
else
print("No")
end
task.wait(1)
end)
Script 2 ^^
local event = game:GetService("ReplicatedStorage"):WaitForChild("respawn")
function Respawn(player)
player:LoadCharacter()
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
char:WaitForChild("Humanoid").Died:connect(function()
event:FireClient(player)
end)
end)
Respawn(player)
end)
event.OnServerEvent:connect(function(player)
Respawn(player)
end)