Walk speed and jump power change doesn't apply on respawn?
Asked by
2 years ago Edited 2 years ago
Hi, I am working on an obby game.
The game settings:
Jump: 0
Walk: 0
Basically, you cannot move or jump.
01 | local sounds = game.Workspace.Sounds |
03 | local player = script.Parent.Parent.Parent.Parent |
05 | local TweenService = game:GetService( "TweenService" ) |
07 | local tweenInfo = TweenInfo.new( 0.2 ,Enum.EasingStyle.Linear) |
08 | local SongFadeTweenInfo = TweenInfo.new( 0.5 ,Enum.EasingStyle.Quad) |
10 | local SongFadeOut = TweenService:Create(sounds.MainMenu,SongFadeTweenInfo, { Volume = 0 } ) |
13 | local button = script.Parent.Parent:WaitForChild( "PlayButton" ) |
15 | button.MouseEnter:Connect( function () |
16 | button.Parent.Texty.Visible = true |
19 | button.MouseLeave:Connect( function () |
20 | button.Parent.Texty.Visible = false |
23 | button.MouseButton 1 Click:Connect( function () |
24 | local Character = game.Workspace:FindFirstChild(player.Name) |
25 | script.Parent.Visible = false |
26 | script.Parent.Parent.Texty.Visible = false |
29 | script.Parent.Parent.ImageLabel.Visible = false |
30 | script.Parent.Parent.TextLabel.Visible = false |
31 | game.Lighting.Blur:Destroy() |
32 | Character.Humanoid.WalkSpeed = 16 |
33 | Character.Humanoid.JumpPower = 50 |
35 | script.Parent.Parent.ModeSelectFrame.Visible = true |
36 | script.Parent.Parent.ModeSelectBackground.Visible = true |
37 | script.Parent.Parent.Texty 2. Visible = true |
This is a LocalScript in StarterGUI > Frame > TextButton
This script works fine, but the WalkSpeed and JumpPower change doesn't apply on respawn.
Any help is appreciated!
If you want more information, please ask. I will answer whenever I can.