Hey there! Sorry if this is a dumb question. I am still at a basic level of scripting and learning every day.
I had this script working perfectly for teleporting back and forth as you can see:
local pressed = false
local client = game:GetService("Players").LocalPlayer
game:GetService("UserInputService").InputBegan:connect(function(input, gpe)
if gpe then return end
if input.KeyCode == Enum.KeyCode.V then
pressed = true
while pressed == true do
client.Character:SetPrimaryPartCFrame(CFrame.new(275,3.94,347.568))
wait(0.1)
client.Character:SetPrimaryPartCFrame(CFrame.new(275,5.94,347.568))
wait(0.1)
end
end
end)
But instead of this teleport script:
client.Character:SetPrimaryPartCFrame(CFrame.new(275,3.94,347.568))
wait(0.1)
client.Character:SetPrimaryPartCFrame(CFrame.new(275,5.94,347.568))
wait(0.1)
I need it to execute this script below:
local A_1 = "police"
local A_2 = -1
local Event = game:GetService("ReplicatedStorage").RPC["Businesses_Purchase"]
Event:FireServer(A_1, A_2)
Can someone explain how to do this? I am curious because nothing I try seems to be working. I greatly appreciate it!

1 comment
Show what you have done