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

so it works in studio but not on a server... my touch script wont run me reason?

Asked by 7 years ago


if x == 1 then if key.KeyCode == Enum.KeyCode.Q then

print("test")

if test == false then return end
test = false ani3load:Play()

local scr = script["Touch1"]:Clone()

scr.Parent = plr.Character scr.Disabled = false

wait(0.7) scr:Remove()

test = true end end

--it sets the touch scripts parent to the localplayer character but it wont run, it is a normal script and this script is a localscript. i do have repeat wait in this script to and the touch script should not need one. ~~~~~~~~~~~~~~~~~



~~~~~~~~~~~~~~~~~




0
ops 1000anton 38 — 7y
0
Can you pls edit this question to fix the code block, you can also preview your question to see how it will be shown when it is posted. User#5423 17 — 7y

1 answer

Log in to vote
0
Answered by
ARTEK22 135
7 years ago

So, seems like there's an article to help you: here

But if it does not help you, here's my help!

So, the ROBLOX studio runs every single script locally, even server scripts.

The servers, of course, work differnent. Only localscripts are runned locally.

Since your script uses keybinding that should mean it is supposed to run locally.

The solution is to, just change the script into a localscript! Everything should run fine.

Remember, if your script uses something that acceses the player, detects the player's mouse, keyboard and others, USE A LOCAL SCRIPT!

A person who never made a mistake never tried anything new. Albert Einstein

Also, remember to use the code blocks correctly. Click the lua button and paste the code BETWEEN those 2 ~~~ bars.

0
I also have the same issue with my haptic feedback scripts they work in studio but not anywhere else agentbuzz3 7 — 7y
Ad

Answer this question