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

User input script not working?

Asked by
yoshiegg6 176
9 years ago

This is in a local script in a tool and it doesn't work. ITs supposed to clone a model from replicated storage to right in front of your character when you press r and it uses context action service. There is no output but it still doesn't work. Can anyone help me?

Edit: Now that I am using a local script I decided to use the regular KeyDown event, can you tell me what's wrong with this? It's still in the same place

--Normal variables
local Player = game.Players.LocalPlayer
local char = Player.Character
local Mouse = Player:GetMouse()
local debounce = false
--Animation setup
local A = Instance.new("Animation", script.Parent)
A.AnimationId = "http://www.roblox.com/Asset?ID=211592172"
local track = char.Humanoid:LoadAnimation(A)

function firewall(key)
if key == "r" and not debounce and script.Parent.Equipped == true then
local CF = game.ReplicatedStorage.Firewall:Clone().Parent = game.Workspace
CF.MainPart.Position = char.Torso.Position + Vector3.new(5,0,0)
Cf.Rotation = char.Torso.Rotation
track:Play()
debounce = true
wait(3)
debounce = false
end
end

Mouse.KeyDown:connect(firewall)
0
I realize that this is your 4th or 5th repost to the same question. You might want to try a different system. yumtaste 476 — 9y
0
Like what? yoshiegg6 176 — 9y
0
Ok I tried a different method please help. yoshiegg6 176 — 9y

Answer this question