Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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)

gui = script.Parent.HouseChoose

local function onMouseClick(player)
local Character = player.Character or player.CharacterAdded:wait()
script.Parent.ClickDetector.MaxActivationDistance = 0
Character.Humanoid.WalkSpeed = 0
local playergui = player.PlayerGui 
local dgui = gui:Clone()
dgui.Parent = playergui
wait(.5)
dgui.Choose1:TweenPosition(UDim2.new(0.041, 0,0.074, 0))
dgui.Plot.Value = script.Parent.Parent.Parent.Name
end
script.Parent.ClickDetector.MouseClick:connect(onMouseClick)

1 comment

0

Could it be because you're not using WaitForChild? For the GUI, try making it equal to script.Parent:WaitForChild("HouseChoose")

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.