Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
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.

0
Is the game Filtering Enabled? Azuc 112 — 6y
0
no its not filtering enabled andrewplayer 0 — 6y

1 answer

Log in to vote
0
Answered by
poke7667 142
6 years ago
Edited 6 years ago

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.

0
I did both of the things you said, it still won't work.. andrewplayer 0 — 6y
Ad

Answer this question