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

Is there a way to fix this script?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

The following script seems to work in play solo and test mode but not in an actual server. I've tried all test modes including f6 and it seems to work fine yet nothing occurs in a real time server. I've tried using this on a normal script with respects to game.Players. The following script is run from a local script inside the player's character.

Is there a way to fix this script? Thank you.

wait(1)
Person = game.Players.LocalPlayer
Transmuting = false

function Transmutation1()
    local CircleClone = game.ServerStorage.EarthCircle1:Clone()
    CircleClone.Parent = workspace
    CircleClone:MoveTo(Person.Character.Torso.Position)
    CircleClone.CircleWork.Disabled = false
    Animation = Person.Character.Humanoid:LoadAnimation(script.DrawCircle)
    Person.Character.Humanoid.WalkSpeed = 0
    Animation:Play()
    wait(11)
    Person.Character.Humanoid.WalkSpeed = 16
    Animation:Stop()
end

Person.GetMouse().KeyDown:connect(function(key)
    if key:byte() == 49 and Transmuting == false then
        Transmuting = true
        print("First transmutation.")
        Transmutation1()
        wait(5)
        Transmuting = false
    end
end)

2 answers

Log in to vote
-2
Answered by 8 years ago

A much simpler and easier way to do things is that you could just move the 'CircleClone' to Replicated Storage. Also if filtering enabled is true then you may have to make a Remote Event for the Server Script to fire and you won't need to move Circle Clone around.

Hope this helped!

0
Consider taking good practice into mind User#6546 35 — 8y
0
Seems to work. Thank you. VinnyTheButcher 278 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

It works in Studio, but not online!

LocalScripts can't access ServerStorage. Consider firing a RemoteEvent to let the server handle it.

Answer this question