© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
26 replies
GregTheEgg

✅ Variable access help :(

I have an object named player and I'm trying to access a variable, an int, called speed and I've been told to use "GetComponent" although when I use it I'm a tad bit confused on how to access the variable?
"speed = player.GetComponent<speed>();" is what I tried which didn't work.
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Variable Access-Manipulation ?
C#CC# / help
4y ago
❔ ✅ Access variable from another script
C#CC# / help
3y ago
❔ c# access variable from other thread
C#CC# / help
3y ago
❔ How to access variable from AccessibilityObject ?
C#CC# / help
3y ago