#hp

46 messages · Page 1 of 1 (latest)

tepid eagle
#
local RS = game.GetService("ReplicatedStorage")

local Remote = RS:WaitForChild("PurpleRemote")

local Player = game.Players.LocalPlayer


UIS.InputBegan:Connect(function(input, processed)
 if input.UserInputType == Enum.UserInputType.Keyboard and processed == false then 
 if input.KeyCode == Enum.KeyCode.Q then 

local char = Player.Character 
local hrp = char.HumanoidRootPart    
if char then 
local mousePos = Player:GetMouse().Hit.Position
Client: local dir = (mousePos - hrp.Position).Unit
local lookVector = Vector3.new)(dir.X, 0, dir.Z)
local newCframe = CFrame.new(hrp.Position, hrp.Position + lookVector)

Remote:FireServer("Hollow Purple", newCframe)
print(Player)
 end) 
``` ```Server: local ts = game.GetService("TweenService")
local RS = game.GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local SoundStorage = game:GetService("SoundService")

local purpleEvent = RS:WaitForChild("PurpleRemote")
local vfx = ServerStorage:WaitForChild("HollowPurple")

purpleEvent.OnServerEvent:Connect(function(plr. eventType Arg1)
local character = plr.Character
    if eventType == "Hollow Purple" then 
 local loadedAnim = character.Humanoid:LoadAnimation(script["Animation"])
loadedAnim:Play()

end) ``` my first script i dont know whats wrong but when i press q it dosent play anim
solar thicket
#

try local loadedAnim = character.Humanoid.Animator:LoadAnimation(script["Animation"])

#

animations are meant to be loaded from the animator which is a child of the humanoid

river agate
#

Are you not reading your output?

#

You're missing the end to your event listener's if-statement, and your parameter syntax is malformed ("plr. eventType Arg1")

#

Shit, even the first one has problems

#

What the hell are you doing, dude

tepid eagle
river agate
#

Do you not see the red underlines?

tepid eagle
#

no

river agate
tepid eagle
#

i dont see the red underlines

river agate
#

This is wrong:

#

Vector3.new)(dir.X, 0, dir.Z)

#

This is wrong:

tepid eagle
#

the guy in the tut didnt have anu problems rizz

river agate
#

Client: local dir = (mousePos - hrp.Position).Unit

#

This is wrong:

#

local UIS = game.GetService("UserInputService")
local RS = game.GetService("ReplicatedStorage")

#

This is wrong:
Server: local ts = game.GetService("TweenService")
local RS = game.GetService("ReplicatedStorage")

river agate
#

How did you mess up such a simple act?

tepid eagle
#

i dont know

#

send me good tut

#

pls

river agate
#

The tutorial is not the problem

#

You are

#

You apparently don't know what it means to copy something word-for-word

#

Machines are very particular about the code that we write

#

It must adhere to several laws and constraints

#

You can't just go around changing what the YouTuber did

tepid eagle
#

i didnt change anything he did

autumn shellBOT
#

studio** You are now Level 1! **studio

river agate
tepid eagle
#

can you tell me what get service meanws

#

pwease

#

👉 👈

#

@river agate

cobalt jay
tepid eagle
#

how do i make it so when i touch something it prints

cobalt jay
#

Part.touched:connect(function(hit)
print(hit)
end)

#

That’ll print whatever hits it