#Error in output even if everything is working

1 messages · Page 1 of 1 (latest)

plain willow
#

So i've been coding on my game for lets say 3 days and now as im coding the part where the player goes out of the house, everything works but in my output window it says and error:

deep palm
#

seemed like you tried to connect to event Triggered in a player's PlayerGui

#

which doesn't exist

#

screenshot is too small to tell where

plain willow
#

i can send you every script

#

because when i click on the text it doesn't bring me to the script

deep palm
#

just show me more of the error

#

you uct off the part that tells me what script is erroring

plain willow
deep palm
#

a little bit more

#

that stack trace

#

stack begin

#

all the blue text too

plain willow
#

@deep palm

deep palm
#

there's a script in StarterGui and on line 3 you have a connection

plain willow
#

ohh

#

i think i typed "triggered" with capitalized start

#

so they think i mean it as like thing

#

nope

#

didn't fix

#

the line 3 on the script is script.Parent.triggered:Connect(function(hit)

#

it doesn't work, plz h elp

#

@deep palm

deep palm
#

yeah its because script.Parent, when everything gets cloned out of the startergui, that script will be in your players PlayerGui and the script.Parent of that will be a PlayerGui which doesn't have the triggered event

plain willow
#

nvm i fixed

deep palm
#

bet

plain willow
#

i didn't even need the script

#

lol

#

now i have another issue

#

@deep palm 😭

deep palm
plain willow
#

the script is

#

local prompt = script.Parent.ProximityPrompt
local anim = script.Parent.Animation

prompt.Triggered:Connect(function(plr)
local hum = workspace.Character:WaitForChild("Humanoid")
local loadAnim = hum.Animator:LoadAnimation(anim)
loadAnim:play()
hum.WalkSpeed = 0
task.wait(10)
hum.WalkSpeed = 10
end)

deep palm
#

character is a property of player, the player's character when added into workspace is renamed according to their name.

plain willow
#

yeah

#

thats what i want

#

i want it to scan the character for a humanoid when the player loads in and stores it as "hum" variable

#

@deep palm

bleak scarab
#

thats not what u want

#

ur looking for the character from the workspace

#

ur supposed to take it from the player

#

just replace the workspace with plr

plain willow
#

al

#

r