Why is the player only freezing sometimes?
So i have this script, it's saposed to freeze the player, clone the gui, and make it so you cannot click it again, the problem is i made 2 of these one time it worked, the other time i could still move
This is a FE Place and is in the workspace(idk if i needed to say that)
01 | gui = script.Parent.HouseChoose |
03 | local function onMouseClick(player) |
04 | local Character = player.Character or player.CharacterAdded:wait() |
05 | script.Parent.ClickDetector.MaxActivationDistance = 0 |
06 | Character.Humanoid.WalkSpeed = 0 |
07 | local playergui = player.PlayerGui |
08 | local dgui = gui:Clone() |
09 | dgui.Parent = playergui |
11 | dgui.Choose 1 :TweenPosition(UDim 2. new( 0.041 , 0 , 0.074 , 0 )) |
12 | dgui.Plot.Value = script.Parent.Parent.Parent.Name |
14 | script.Parent.ClickDetector.MouseClick:connect(onMouseClick) |