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

Why does this only work in studio not in game?

Asked by 6 years ago
Edited 6 years ago

Why Doesn't this work in game?

local net = script.Parent.Parent.Net.Mesh
script.Parent.Touched:Connect(function(hit)
    print(hit)
    if hit:IsA("Part") then
        net.Scale = Vector3.new(2.885, 2.7, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.5, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.3, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.1, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1.9, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1.7, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1.3, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, .9, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, .5, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, .2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -0.2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -.8, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -1.3, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -1.8, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -2.2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -2.6, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -2.9, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -2.6, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -2.2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -1.8, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -1.4, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -1, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -.6, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, -.2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, .2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, .6, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1.4, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 1.8, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.2, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.6, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
        net.Scale = Vector3.new(2.885, 2.9, 2.9)
        game:GetService('RunService').RenderStepped:Wait(1)
    end
end)
0
renderstepped can only be used by localscripts maumaumaumaumaumau 98 — 6y
0
Is this a script or a local script? VewixxPlayer 67 — 6y
0
Why is line 4 there? It's useless. User#19524 175 — 6y
0
Any idea how to turn this into a local script ? or do I just copy and paste this script WillBe_Stoped 71 — 6y
View all comments (5 more)
0
Just copy and paste it into a loca VewixxPlayer 67 — 6y
0
No User#19524 175 — 6y
0
bro use a for loop instead of writing thousands of lines EpicMetatableMoment 1444 — 6y
0
I would think by like 30 you would have thought "I should use a loop" or something o.o User#5423 17 — 6y
0
Naw, i'm really dumb lol. And pretty new to scripting xd WillBe_Stoped 71 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

As maumaumaumaumaumau said, It can only be used in a LocalScript.

A LocalScript will only make it run on the Client side. If you want other players in the Server to see this change, use a RemoteEvent.

For extra assistance, please contact me on Discord.

Bark#4260

Ad

Answer this question