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

How do i make this tween in servers?

Asked by 8 years ago

The tweening part of this script works perfectly in studio and studio server test but not in the actual game. Everything else works perfectly except the tweening. All i need help with is making the tween work in servers.

01local NPC = script.Parent.UpperTorso
02 
03while true do
04    local ply = game.Players:GetChildren()
05    for i = 1, #ply do
06        local char = game.Workspace:findFirstChild(ply[i].Name)
07        if char ~= nil then
08            if (NPC.Position - char.UpperTorso.Position).magnitude <= 8 then
09                if ply[i]:findFirstChild("TalkingToNPC") then
10               else
11                if ply[i].Gamestuff.Characters.Folder.Class.Value == "None" then
12                local thing = Instance.new("StringValue",ply[i])
13                thing.Name = "TalkingToNPC"
14                     local ChatClone = script.ChatGui:Clone()
15                     ChatClone.Name = "ChatClone"
View all 42 lines...

2 answers

Log in to vote
0
Answered by 8 years ago

To lay down a bit of advice, since the latest Roblox Update, I have been having this problem too. Tweening does not trigger from any type of script in Workspace anymore. And, I am assuming that this script works from Workspace, correct?

You now basically have to throw your script into the place you want within PlayerGui and modify your script to work from there.

0
O hey it works User#13357 0 — 8y
0
YAY! @wallopinweb JoeRaptor 72 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

The reason your code works in Roblox Studio is because both server scripts and local scripts are the same when you click on the Play button inside roblox studio. When you wish to test if your game works, use the Start button under Clients and Servers .

Server scripts can't access the PlayerGui.

You'll have to use remote events for that.

If you need an example onto that, I'll gladly help you.

0
It's not because of that. When i first made it it worked all around. I guess its because of a Roblox Update User#13357 0 — 8y

Answer this question