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

is it possible to tween a object when a remote function is fired?

Asked by
3wdo 198
5 years ago
Edited 5 years ago

im making a game based off the japanese game show the death pit.i want it so when someone says ready the platform will move. Can some one help me with my script? the first script is in serverscriptservice if that affects this

1game.Players.PlayerAdded:Connect(function(player)
2    player.Chatted:Connect(function(message)
3        if message == "ready" or "Ready" then
4            game.ReplicatedStorage["Start Game"]:FireServer()
5    end
6end)
01local TweenService = game:GetService("TweenService")
02local PlatForm = script.Parent.Parent:WaitForChild("DisapearPart")
03local tweeningInformation = TweenInfo.new(
04    5,  
05    Enum.EasingStyle.Linear,
06    Enum.EasingDirection.Out,
07    0,
08    false,
09    0
10)
11local Move = {CFrame = CFrame.new(99.125, 177.707, -262.83)}
12local ComeBack = {CFrame = CFrame.new(99.125, 177.707, -215.915)}
13local tween1move = TweenService:Create(PlatForm,tweeningInformation,Move)
14local tween1comeback = TweenService:Create(PlatForm,tweeningInformation,ComeBack)
15 
View all 22 lines...

1 answer

Log in to vote
1
Answered by
Creacoz 210 Moderation Voter
5 years ago
Edited 5 years ago

I would do it all in 1 script since they're both on the server

01local plr = game:GetService("Players").LocalPlayer
02local TweenService = game:GetService("TweenService")
03local PlatForm = game:GetService("Workspace").DisapearPart
04 
05local tweeningInformation = TweenInfo.new(
06    5,  
07    Enum.EasingStyle.Linear,
08    Enum.EasingDirection.Out,
09    0,
10    false,
11    0
12)
13 
14local Move = {CFrame = CFrame.new(99.125, 177.707, -262.83)}
15local ComeBack = {CFrame = CFrame.new(99.125, 177.707, -215.915)}
View all 30 lines...
Ad

Answer this question