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

How to make a normal Script line works on LocalScript?

Asked by 7 years ago

Hello, im editing a LocalScript, i made a line that only work for normal scripts and i dont know how to edit it to make it work. can someone help me with this?

Line i want to make it work in a LocalScript

script.Parent.Parent.Parent.Model.Eyes_MeshPart.eye_Decal.Texture = "rbxassetid://983391704"

The LocalScript

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                script.Parent.Parent.Parent.Model.Eyes_MeshPart.eye_Decal.Texture = "rbxassetid://983391704"
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                script.Parent.Parent.Parent.Model.Eyes_MeshPart.eye_Decal.Texture = "rbxassetid://983394022"
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
0
Setting a texture can be used with both Server Scripts and Local Scripts. PyccknnXakep 1225 — 7y
0
How can i edit it? i really dont know why is not working DJBrianL 0 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

If it works in a script, you could fire a RemoteEvent to use that line of code in a script.

0
I tested it in a normal script and dont work, can you show me how to edit it in the LocalScript? DJBrianL 0 — 7y
Ad

Answer this question