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

Why won't this script work in the actual game, just in play mode?

frame = script.Parent:WaitForChild("Frame")
local Power = game.Workspace:WaitForChild("Powers").HOHPower
local Enabled = true

Power.Changed:Connect(function()
	if Power.Value == true then
		Enabled = false
		frame.Position = UDim2.new(-1, 0, 0.815, 0)
		frame:TweenPosition(UDim2.new(0.45, 0, 0.815, 0), 'Out', 'Quad', 1)
		wait(3)
		frame:TweenPosition(UDim2.new(1.3, 0, 0.815, 0), 'Out', 'Quad', 1)
		Enabled = true
		Power.Value = false
	end
	
end)


I have a button where when you click a text button, the power will change. I know the power changes in roblox studio, but not in roblox. I've been trying to figure out how to fix this like all day. It is soppose to make a thing pop up on all players screen once the power changes. I'm really confused and don't know what to do, I've tried everything I could. It only works in Roblox studio play mode.

2 comments

0

Is the game Filtering Enabled?

0

no its not filtering enabled

1 answer

First off, make sure the script is in a localscript. Also, This isn't working maybe because you are always tweening out and never in. If you want your frame to move to the right, use Out. If you want your frame to move to the left, use In.

1 comment

0

I did both of the things you said, it still won't work..

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