quebrado
(quebrado)
#1
Hello guys, I want to know, if there’s any way to play this script from a localscript in StarterGui:
> local TweenService = game:GetService("TweenService")
> local tweenPart = game.Workspace.Fall.CameraPart
> local info = TweenInfo.new(
> 80,
> Enum.EasingStyle.Linear,
> Enum.EasingDirection.InOut,
> 0,
> true,
> 0
> )
>
> local Goals = {
> Position = Vector3.new(-436.548, 253.709, 1926.019),
> }
>
> local PartTween = TweenService:Create(tweenPart, info, Goals)
> PartTween:Play()
1 Like
Use remote events/functions or else you can’t :<
1 Like
quebrado
(quebrado)
#3
I’ve tried, but I’m new at this and don’t know how exactly…
1 Like
well you could put a local script in starterplayerscripts that could work?
quebrado
(quebrado)
#5
I need it to be in StarterGui…
maybe make the script go into the player scripts? im not that good at scripting btw
BossSpax
(BossSpax)
#7
This module might be what your looking for?
1 Like
here’s an example:
localscript:
local remoteFunction = ReplicatedStorage:WaitForChild("RemoteFunctionTest")
--Script
remoteFunction:InvokeServer()
script:
remoteFunction.OnServerInvoke = function(Player)
--TweenCode
end
Galactiq
(Matthew)
#9
Is it not working? I don’t see what the issue is. This script should work just fine as it is, unless you are referencing something incorrectly.
Galactiq
(Matthew)
#10
Why would they need RemoteFunctions to tween a part?
quebrado
(quebrado)
#11
Idk if it matter, but I’m trying to tween it from the client and not server
Galactiq
(Matthew)
#12
It doesn’t matter. You can most definitely do this. Just keep in mind it only tweens for that individual player.
quebrado
(quebrado)
#13
Oh yeah, I was trying to test it by using “Run” but it only works in if you test in “Play”
Thank you very much bro
1 Like