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

Why doesn't this button work?

Asked by 10 years ago

For some reason when I try to click on the button I have the script in, It doesn't respond or print any errors. But it works fine in Play Solo and Start Server. Can somebody help? Thanks! c;

repeat wait() until script.Parent.Parent:FindFirstChild("SponsorOpen")
local open = script.Parent.Parent.SponsorOpen

script.Parent.MouseButton1Down:connect(function()
    if open.Value then
        script.Parent.Parent.SponsorFrame:TweenPosition(UDim2.new(-0.4, 0, 0.125, 0), "Out", "Quart", 0.75, true)
    else
        script.Parent.Parent.SponsorFrame:TweenPosition(UDim2.new(0.3, 0, 0.125, 0), "Out", "Quart", 0.75, true)
        script.Parent.Parent.ShopFrame:TweenPosition(UDim2.new(-0.4, 0, 0.125, 0), "Out", "Quart", 0.75, true)
        script.Parent.Parent.ShopOpen.Value = false
    end
    open.Value = not open.Value
end)

1 answer

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

TweenSize, TweenPosition, and TweenSizeAndPosition seem to have been broken by ROBLOX staff in the last update, I have started a topic in the Help Forum about this issue. I am not sure if staff are aware of it, and you might receive faster response through their email [email protected].

At the time of posting this answer, it appears that ROBLOX has broken the method in Server Side Scripts or have disabled it for security issues. Whatever the case is, it might be a good idea to try using the script in a LocalScript. Though this was just a response from a person in the help forum, not particularly a administrator for the site.

Ad

Answer this question