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

This MouseButton1Click isnt working in studio but its working in-game. Help?

Please Help!

local telebutton = script.Parent:WaitForChild("Background")
local background = script.Parent:FindFirstChild("Background")
local player = game.Players.LocalPlayer
local countdown = script.Parent:FindFirstChild("Background1")
local cvalue = script.Parent:FindFirstChild("Countdown")

telebutton.TeleButton.MouseButton1Click:connect(function()
	background.Visible = false
	player.Character.UpperTorso.CFrame = CFrame.new(workspace.Teleport.Position)
	player.Character.Humanoid.WalkSpeed = 0
	countdown.Visible = true
	countdown.TextLabel.Text = cvalue.Value
	repeat wait(1)
		cvalue.Value = cvalue.Value - 1
		countdown.TextLabel.Text = cvalue.Value
	until cvalue.Value == 0
	countdown.Visible = false
	cvalue.Value = 5
	player.Character.Humanoid.WalkSpeed = 25
	player.Character.Humanoid.JumpPower = 50
end)

7 comments

0

Any errors?

0

No, its really weird

0

wait is the title backwards or

0

What do you mean by is the title backwards?

0

i fixed this issue but now nothing else in the server script I have isnt working..

0

If the script is working in game, there is nothing to worry about!

1 answer

If that script is in Starter Gui, you should probably make the script a local script instead of a regular script...

1 comment

0

No, the guy is saying that it works IN GAME, but NOT STUDIO.

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