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

Gui not tweening from RemoteEvent?

So I'm trying to make a warhead script that sounds two alarms, then tweens a GUI that shows a countdown until the explosion. The sound part works, but not the GUI script.

SERVER SCRIPT

local event = game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Warhead"):WaitForChild("TweenGui")
local sounds = game.Workspace.Sounds.Warhead
local Players = game:GetService("Players")

sounds.Announce:Play()
wait(4.2)
sounds.Siren:Play()
event:FireAllClients()
wait(90)
sounds.Explosion:Play()

LOCAL SCRIPT

local event = game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Warhead"):WaitForChild("TweenGui")
local Player = game:GetService("Players").LocalPlayer
local Gui = Player.PlayerGui.WarheadTimer.Frame

event.OnClientEvent:Connect(function() 
	Gui:TweenPosition(UDim2.new(0.271, 0,0, 0),'Out','Quint',1,true)
end)

1 comment

0

Are you sure you set the right position for it? Is the ClientEvent being called? put a print statement in there to check

1 answer

Turns out someone scaled the GUI very small, so that I wouldn't see it tween

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